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

Skip to content

Commit a8114fe

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ 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) && $trace = @xdebug_get_function_stack()) {
3737
if (0 < $traceOffset) {
3838
array_splice($trace, -$traceOffset);
3939
}

0 commit comments

Comments
 (0)