Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e357dbb

Browse filesBrowse files
committed
bug #40679 [Debug][ErrorHandler] Avoid warning with Xdebug 3 with develop mode disabled (Jean85)
This PR was merged into the 4.4 branch. Discussion ---------- [Debug][ErrorHandler] Avoid warning with Xdebug 3 with develop mode disabled | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #40677 | License | MIT As reported in #40677, this fix is needed when Xdebug 3 is enabled but its `develop` mode is off. Commits ------- 0e0639b Avoid warning with Xdebug 3 with develop mode disabled
2 parents 3b1948f + 0e0639b commit e357dbb
Copy full SHA for e357dbb

File tree

2 files changed

+2
-4
lines changed
Filter options

2 files changed

+2
-4
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Debug/Exception/FatalErrorException.php
+1-2Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Component/ErrorHandler/Error/FatalError.php
+1-2Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.