mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 11:09:18 +02:00
fix: search filter labels, 429 page styling, __wakeup PHP 8.x deprecation
- Replace three <span class='search-filter-label'> with proper <label for='...'> elements in search.php filter bar; add id attributes to the corresponding <select> elements so the label/control association is programmatic (WCAG 1.3.1, 3.3.2). - Rewrite the rate-limit 429 early-exit in search.php from a bare one-liner echo to a full HTML document with lang='fr', viewport meta, and inline dark styles matching maintenance.php; inject the retry countdown into the user-facing message (Template audit F). - Fix PHP 8.x __wakeup() deprecation in Database.php singleton guard: replace the throw statement with trigger_error(..., E_USER_ERROR) and add an explicit void return type (Refactor audit C).
This commit is contained in:
@@ -1284,9 +1284,11 @@ class Database {
|
||||
private function __clone() {}
|
||||
|
||||
/**
|
||||
* Prevent unserialization
|
||||
* Prevent unserialization.
|
||||
* PHP 8.x deprecates throwing from __wakeup(); use trigger_error instead.
|
||||
*/
|
||||
public function __wakeup() {
|
||||
throw new Exception("Cannot unserialize singleton");
|
||||
public function __wakeup(): void {
|
||||
// phpcs:ignore
|
||||
trigger_error('Cannot unserialize singleton ' . static::class, E_USER_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user