Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit0d2bc7b

Browse 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 inphp/php-src#5620 (comment)Commits-------aa50c92 [ErrorHandler] fix setting $trace to null in FatalError
2 parents5fe0f94 +aa50c92 commit0d2bc7b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

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

[8]ページ先頭

©2009-2025 Movatter.jp