Skip to content

Commit

Permalink
PHP8-compatible check for suppressed errors
Browse files Browse the repository at this point in the history
Update error_handler() to correctly deal with `@` operator, as per
https://www.php.net/manual/en/migration80.incompatible.php

Fixes #27799
  • Loading branch information
dregad committed Dec 30, 2020
1 parent de1679d commit 67e707e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/error_api.php
Expand Up @@ -142,7 +142,7 @@ function error_handler( $p_type, $p_error, $p_file, $p_line ) {
global $g_error_send_page_header;

# check if errors were disabled with @ somewhere in this call chain
if( 0 == error_reporting() ) {
if( !( error_reporting() & $p_type ) ) {
return;
}

Expand Down

0 comments on commit 67e707e

Please sign in to comment.