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

Browse filesBrowse files
bug #36993 [ErrorHandler] fix setting $trace to null in FatalError (nicolas-grekas)
This PR was merged into the 4.4 branch. Discussion ---------- [ErrorHandler] fix setting $trace to null in FatalError | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Spotted by @nikic in php/php-src#5620 (comment) Commits ------- aa50c92 [ErrorHandler] fix setting $trace to null in FatalError
2 parents 5fe0f94 + aa50c92 commit 0d2bc7b
Copy full SHA for 0d2bc7b

File tree

1 file changed

+5
-3
lines changed
Filter options

1 file changed

+5
-3
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/ErrorHandler/Error/FatalError.php
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,11 @@ public function __construct(string $message, int $code, array $error, int $trace
7272
'line' => $error['line'],
7373
'trace' => $trace,
7474
] as $property => $value) {
75-
$refl = new \ReflectionProperty(\Error::class, $property);
76-
$refl->setAccessible(true);
77-
$refl->setValue($this, $value);
75+
if (null !== $value) {
76+
$refl = new \ReflectionProperty(\Error::class, $property);
77+
$refl->setAccessible(true);
78+
$refl->setValue($this, $value);
79+
}
7880
}
7981
}
8082

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.