Skip to content

Commit

Permalink
[HttpKernel] Fix possible infinite loop of exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
enumag committed Feb 21, 2019
1 parent 4b56617 commit 9e6e464
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ public function onKernelException(GetResponseForExceptionEvent $event)
} catch (\Exception $e) {
$this->logException($e, sprintf('Exception thrown when handling an exception (%s: %s at %s line %s)', \get_class($e), $e->getMessage(), $e->getFile(), $e->getLine()));

if ($exception === $e) {
throw $e;
}

$wrapper = $e;

while ($prev = $wrapper->getPrevious()) {
Expand Down

0 comments on commit 9e6e464

Please sign in to comment.