8000 Avoid warning with Xdebug 3 with develop mode disabled · jderusse/symfony@0e0639b · GitHub
[go: up one dir, main page]

Skip to content

Commit 0e0639b

Browse files
committed
Avoid warning with Xdebug 3 with develop mode disabled
1 parent 4e4cdf5 commit 0e0639b

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/Symfony/Component/Debug/Exception/FatalErrorException.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ public function __construct(string $message, int $code, int $severity, string $f
3535

3636
$this->setTrace($trace);
3737
} elseif (null !== $traceOffset) {
38-
if (\function_exists('xdebug_get_function_stack')) {
39-
$trace = xdebug_get_function_stack();
38+
if (\function_exists('xdebug_get_function_stack') && $trace = @xdebug_get_function_stack()) {
4039
if (0 < $traceOffset) {
4140
array_splice($trace, -$traceOffset);
4241
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ public function __construct(string $message, int $code, array $error, int $trace
3333
}
3434
}
3535
} elseif (null !== $traceOffset) {
36-
if (\function_exists('xdebug_get_function_stack')) {
37-
$trace = xdebug_get_function_stack();
36+
if (\function_exists('xdebug_get_function_stack') && $trace = @xdebug_get_function_stack()) {
3837
if (0 < $traceOffset) {
3938
array_splice($trace, -$traceOffset);
4039
}

0 commit comments

Comments
 (0)
0