8000 [ErrorHandler] Do not call xdebug_get_function_stack() with xdebug >=… · symfony/symfony@a0ce787 · GitHub
[go: up one dir, main page]

Skip to content

Commit a0ce787

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

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

+2-1
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)
0