[Debug] fix for PHP 7.3.16+/7.4.4+
This commit is contained in:
parent
e3cc3bdb04
commit
b3d9a8ac30
@ -521,7 +521,7 @@ class ErrorHandler
|
|||||||
$errorAsException ? ['exception' => $errorAsException] : [],
|
$errorAsException ? ['exception' => $errorAsException] : [],
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
if (!\defined('HHVM_VERSION')) {
|
if (\PHP_VERSION_ID < (\PHP_VERSION_ID < 70400 ? 70316 : 70404) && !\defined('HHVM_VERSION')) {
|
||||||
$currentErrorHandler = set_error_handler('var_dump');
|
$currentErrorHandler = set_error_handler('var_dump');
|
||||||
restore_error_handler();
|
restore_error_handler();
|
||||||
}
|
}
|
||||||
@ -533,7 +533,7 @@ class ErrorHandler
|
|||||||
} finally {
|
} finally {
|
||||||
$this->isRecursive = false;
|
$this->isRecursive = false;
|
||||||
|
|
||||||
if (!\defined('HHVM_VERSION')) {
|
if (\PHP_VERSION_ID < (\PHP_VERSION_ID < 70400 ? 70316 : 70404) && !\defined('HHVM_VERSION')) {
|
||||||
set_error_handler($currentErrorHandler);
|
set_error_handler($currentErrorHandler);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -327,8 +327,6 @@ class ErrorHandlerTest extends TestCase
|
|||||||
$handler = new ErrorHandler();
|
$handler = new ErrorHandler();
|
||||||
$handler->setDefaultLogger($logger);
|
$handler->setDefaultLogger($logger);
|
||||||
@$handler->handleError(E_USER_DEPRECATED, 'Foo deprecation', __FILE__, __LINE__, []);
|
@$handler->handleError(E_USER_DEPRECATED, 'Foo deprecation', __FILE__, __LINE__, []);
|
||||||
|
|
||||||
restore_error_handler();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user