mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-14 19:08:25 +00:00
PHP8: ErrorHandler fixed accordingly to migration guide.
This commit is contained in:
parent
3b999b74b9
commit
20419bd82b
1 changed files with 3 additions and 1 deletions
|
@ -204,7 +204,9 @@ class ErrorHandler {
|
|||
* @return bool true if error was handled
|
||||
*/
|
||||
public static function handleError($code, $description, $file = null, $line = null, $context = null) {
|
||||
if (error_reporting() === 0) {
|
||||
//PHP8 migration guide: https://www.php.net/manual/en/migration80.incompatible.php
|
||||
//See: @ operator
|
||||
if (!(error_reporting() & $code)) {
|
||||
return false;
|
||||
}
|
||||
list($error, $log) = static::mapErrorCode($code);
|
||||
|
|
Loading…
Reference in a new issue