Merge pull request #17734 from MauricioFauth/hide-deprecation-errors

Hide deprecation notices
This commit is contained in:
Maurício Meneghini Fauth 2022-09-26 17:23:26 -03:00 committed by GitHub
commit a3231cf9ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: