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:
Pontoporeia
2026-03-29 15:47:30 +02:00
parent 3a8ffa6afe
commit 7a4a471838
3 changed files with 61 additions and 22 deletions

View File

@@ -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);
}
}