Skip to content

Commit

Permalink
bug #27662 [HttpKernel] fix handling of nested Error instances (xabbuh)
Browse files Browse the repository at this point in the history
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] fix handling of nested Error instances

| Q             | A
| ------------- | ---
| Branch?       | 4.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #27613
| License       | MIT
| Doc PR        |

Commits
-------

a6696d0 fix handling of nested Error instances
  • Loading branch information
nicolas-grekas committed Jun 21, 2018
2 parents ff0de67 + a6696d0 commit d652222
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -64,7 +64,7 @@ public function onKernelException(GetResponseForExceptionEvent $event)
}
}

$prev = new \ReflectionProperty('Exception', 'previous');
$prev = new \ReflectionProperty($wrapper instanceof \Exception ? \Exception::class : \Error::class, 'previous');
$prev->setAccessible(true);
$prev->setValue($wrapper, $exception);

Expand Down

0 comments on commit d652222

Please sign in to comment.