Avoid warning with Xdebug 3 with develop mode disabled

This commit is contained in:
Alessandro Lai 2021-04-02 09:50:12 +02:00
parent 4e4cdf548c
commit 0e0639b129
No known key found for this signature in database
GPG Key ID: 5D9C513BE4F5798D
2 changed files with 2 additions and 4 deletions

View File

@ -35,8 +35,7 @@ class FatalErrorException extends \ErrorException
$this->setTrace($trace);
} elseif (null !== $traceOffset) {
if (\function_exists('xdebug_get_function_stack')) {
$trace = xdebug_get_function_stack();
if (\function_exists('xdebug_get_function_stack') && $trace = @xdebug_get_function_stack()) {
if (0 < $traceOffset) {
array_splice($trace, -$traceOffset);
}

View File

@ -33,8 +33,7 @@ class FatalError extends \Error
}
}
} elseif (null !== $traceOffset) {
if (\function_exists('xdebug_get_function_stack')) {
$trace = xdebug_get_function_stack();
if (\function_exists('xdebug_get_function_stack') && $trace = @xdebug_get_function_stack()) {
if (0 < $traceOffset) {
array_splice($trace, -$traceOffset);
}