Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 93c8397

Browse files
committed
[ErrorHandler] Do not call xdebug_get_function_stack() with xdebug >= 3.0 when not in develop mode
1 parent 84f0b88 commit 93c8397

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Component/ErrorHandler/Error/FatalError.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ public function __construct(string $message, int $code, array $error, ?int $trac
3333
}
3434
}
3535
} elseif (null !== $traceOffset) {
36-
if (\function_exists('xdebug_get_function_stack') && $trace = @xdebug_get_function_stack()) {
36+
if (\function_exists('xdebug_get_function_stack') && \in_array(ini_get('xdebug.mode'), ['develop', false], true)) {
37+
$trace = xdebug_get_function_stack();
3738
if (0 < $traceOffset) {
3839
array_splice($trace, -$traceOffset);
3940
}

0 commit comments

Comments
 (0)