Skip to content

Commit

Permalink
Merge pull request #17734 from MauricioFauth/hide-deprecation-errors
Browse files Browse the repository at this point in the history
Hide deprecation notices
  • Loading branch information
MauricioFauth committed Sep 26, 2022
2 parents 4f95a86 + 9d7582a commit a3231cf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions libraries/classes/ErrorHandler.php
Expand Up @@ -275,8 +275,11 @@ public function addError(
$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:
Expand Down

0 comments on commit a3231cf

Please sign in to comment.