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 https://github.com/php/php-src/pull/5620#issuecomment-635258024
Commits
-------
aa50c9287c
[ErrorHandler] fix setting $trace to null in FatalError
This commit is contained in:
commit
0d2bc7bd6a
@ -72,11 +72,13 @@ class FatalError extends \Error
|
|||||||
'line' => $error['line'],
|
'line' => $error['line'],
|
||||||
'trace' => $trace,
|
'trace' => $trace,
|
||||||
] as $property => $value) {
|
] as $property => $value) {
|
||||||
|
if (null !== $value) {
|
||||||
$refl = new \ReflectionProperty(\Error::class, $property);
|
$refl = new \ReflectionProperty(\Error::class, $property);
|
||||||
$refl->setAccessible(true);
|
$refl->setAccessible(true);
|
||||||
$refl->setValue($this, $value);
|
$refl->setValue($this, $value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
|
Reference in New Issue
Block a user