Fixing suppressed errors handling for PHP8
Publish PHP Package / docker (push) Successful in 6s Details

This commit is contained in:
Pavel Shevaev 2024-05-02 12:12:46 +03:00
parent 3c57f4536d
commit 506210b757
1 changed files with 4 additions and 2 deletions

View File

@ -5,8 +5,10 @@ function _gamectl_error_handler($errno, $errstr, $errfile, $errline)
if($errno == E_STRICT) if($errno == E_STRICT)
return; return;
// @ sign temporary disabled error reporting $PHP_8_SUPPRESSED = E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | E_PARSE;
if(error_reporting() == 0) $err_rep = error_reporting();
// check if error was suppressed by @
if($err_rep === 0 || $err_rep === $PHP_8_SUPPRESSED)
return; return;
$err = "Error happened: $errno, $errstr, $errfile, $errline\n"; $err = "Error happened: $errno, $errstr, $errfile, $errline\n";