Fix PHP 8 incompatibility with debug mode enabled (#1915)
This commit is contained in:
parent
611b794034
commit
4242f6955a
1 changed files with 6 additions and 1 deletions
|
@ -48,7 +48,12 @@
|
|||
// See all errors (for debugging only)
|
||||
error_reporting(-1);
|
||||
|
||||
set_error_handler(function ($errno, $errstr, $errfile, $errline, array $errcontext) {
|
||||
set_error_handler(function ($errno, $errstr, $errfile, $errline, array $errcontext = []) {
|
||||
// Skip PHP 8 deprecation warning with Pimple.
|
||||
if (strpos($errfile, 'src/Pimple/Container.php') !== -1 && strpos($errstr, 'ArrayAccess::') !== -1) {
|
||||
return error_log($errstr);
|
||||
}
|
||||
|
||||
throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue