diff options
author | MaurĂcio Meneghini Fauth <mauricio@fauth.dev> | 2022-09-26 23:23:26 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-26 23:23:26 +0300 |
commit | a3231cf9aba2d81f59641984e3e7988e908bf851 (patch) | |
tree | 4aabe28613c5e9933113143b551aa9e9c3c50979 /libraries | |
parent | 4f95a862116bbe51154c9f1e66b9f845688c3c3e (diff) | |
parent | 9d7582a2c0c41473c19f6e312bb53f0d3d510921 (diff) |
Merge pull request #17734 from MauricioFauth/hide-deprecation-errors
Hide deprecation notices
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/classes/ErrorHandler.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libraries/classes/ErrorHandler.php b/libraries/classes/ErrorHandler.php index ed9ea46aca..1e114ccc2f 100644 --- a/libraries/classes/ErrorHandler.php +++ b/libraries/classes/ErrorHandler.php @@ -275,8 +275,11 @@ class ErrorHandler $error = new Error($errno, $errstr, $errfile, $errline); $error->setHideLocation($this->hideLocation); - // do not repeat errors - $this->errors[$error->getHash()] = $error; + // Deprecation errors will be shown in development environment, as they will have a different number. + if ($error->getNumber() !== E_DEPRECATED) { + // do not repeat errors + $this->errors[$error->getHash()] = $error; + } switch ($error->getNumber()) { case E_STRICT: |