Skip to content

Commit

Permalink
Merge branch '4.4' into 5.0
Browse files Browse the repository at this point in the history
* 4.4:
  [Security/Http] fix merge
  [ErrorHandler] fix setting $trace to null in FatalError
  • Loading branch information
nicolas-grekas committed May 28, 2020
2 parents baf1f94 + 0df9a23 commit d98fc46
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Error/FatalError.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,11 @@ public function __construct(string $message, int $code, array $error, int $trace
'line' => $error['line'],
'trace' => $trace,
] as $property => $value) {
$refl = new \ReflectionProperty(\Error::class, $property);
$refl->setAccessible(true);
$refl->setValue($this, $value);
if (null !== $value) {
$refl = new \ReflectionProperty(\Error::class, $property);
$refl->setAccessible(true);
$refl->setValue($this, $value);
}
}
}

Expand Down

0 comments on commit d98fc46

Please sign in to comment.