Merge pull request #27939 from yan12125/backport/27631/stable21

[stable21] Correctly skip suppressed errors in PHP 8.0
This commit is contained in:
MichaIng 2021-07-14 14:34:58 +02:00 committed by GitHub
commit ba1f04df90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,7 +85,7 @@ class ErrorHandler {
//Recoverable errors handler
public static function onError($number, $message, $file, $line) {
if (error_reporting() === 0) {
if (!(error_reporting() & $number)) {
return;
}
$msg = $message . ' at ' . $file . '#' . $line;