Amélioré

PHP warnings send an alert email

A PHP warning on the site, such as an undefined array key, is now logged as an error and emailed to the error alert address.

  • Logging::runtimeDiagnostic() logs E_WARNING, E_USER_WARNING and recoverable errors at error level, so they reach ERROR_ALERT_EMAIL like other failures. Notices and deprecations stay warnings and send nothing.
  • Each record names the warning and its file and line from the release root, for example PHP warning: Undefined array key "id" in public/mail.php:817, so each different warning is its own alert, still at most one per ten minutes.