Update to PHP 8.4 compatible

This commit is contained in:
crazywhalecc
2025-03-10 11:05:30 +08:00
committed by Jerry Ma
parent 4c37294275
commit 2da5ef3db1
4 changed files with 8 additions and 4 deletions

View File

@@ -20,7 +20,6 @@ class HandleExceptions implements Bootstrapper
E_USER_ERROR => ['PHP Error: ', 'error'],
E_USER_WARNING => ['PHP Warning: ', 'warning'],
E_USER_NOTICE => ['PHP Notice: ', 'notice'],
E_STRICT => ['PHP Strict: ', 'notice'],
E_RECOVERABLE_ERROR => ['PHP Recoverable Error: ', 'error'],
E_DEPRECATED => ['PHP Deprecated: ', 'notice'],
E_USER_DEPRECATED => ['PHP User Deprecated: ', 'notice'],
@@ -30,7 +29,7 @@ class HandleExceptions implements Bootstrapper
logger()->{$level_tip[1]}($error);
// 如果 return false 则错误会继续递交给 PHP 标准错误处理
return true;
}, E_ALL | E_STRICT);
});
// 重载异常处理器
ExceptionHandler::getInstance()->overrideWith(new Handler());