Merge branch '2.8' into 3.0
* 2.8: Fix backport
This commit is contained in:
commit
37a75f463d
@ -111,7 +111,7 @@ class DeprecationErrorHandler
|
||||
|
||||
exit(1);
|
||||
}
|
||||
if ('legacy' !== $group && self::MODE_WEAK !== $mode) {
|
||||
if ('legacy' !== $group && DeprecationErrorHandler::MODE_WEAK !== $mode) {
|
||||
$ref = &$deprecations[$group][$msg]['count'];
|
||||
++$ref;
|
||||
$ref = &$deprecations[$group][$msg][$class.'::'.$method];
|
||||
@ -131,7 +131,7 @@ class DeprecationErrorHandler
|
||||
restore_error_handler();
|
||||
self::register($mode);
|
||||
}
|
||||
} elseif (!isset($mode[0]) || '/' !== $mode[0]) {
|
||||
} else {
|
||||
self::$isRegistered = true;
|
||||
if (self::hasColorSupport()) {
|
||||
$colorize = function ($str, $red) {
|
||||
@ -144,6 +144,9 @@ class DeprecationErrorHandler
|
||||
}
|
||||
register_shutdown_function(function () use ($getMode, &$deprecations, $deprecationHandler, $colorize) {
|
||||
$mode = $getMode();
|
||||
if (isset($mode[0]) && '/' === $mode[0]) {
|
||||
return;
|
||||
}
|
||||
$currErrorHandler = set_error_handler('var_dump');
|
||||
restore_error_handler();
|
||||
|
||||
|
Reference in New Issue
Block a user