8000 bug #54919 [ErrorHandler] Do not call xdebug_get_function_stack() wit… · symfony/symfony@6049793 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6049793

Browse files
bug #54919 [ErrorHandler] Do not call xdebug_get_function_stack() with xdebug >= 3.0 when not in develop mode (fmata)
This PR was merged into the 5.4 branch. Discussion ---------- [ErrorHandler] Do not call xdebug_get_function_stack() with xdebug >= 3.0 when not in develop mode | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #40677 | License | MIT The PR #40787 was rejected because of env var handling in xdebug_mode. xdebug/xdebug#737 allow us to get xdebug_mode in all cases so I think we can merge this PR safely. Tested on my setup successfully, I have no more warning. Thanks `@ralphschindler` :) Commits ------- a8114fe [ErrorHandler] Do not call xdebug_get_function_stack() with xdebug >= 3.0 when not in develop mode
2 parents 1b258e1 + a8114fe commit 6049793

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)
0