diff options
-rw-r--r-- | Http/Firewall/ExceptionListener.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Http/Firewall/ExceptionListener.php b/Http/Firewall/ExceptionListener.php index 0f81d1b..b2c8862 100644 --- a/Http/Firewall/ExceptionListener.php +++ b/Http/Firewall/ExceptionListener.php @@ -76,6 +76,10 @@ class ExceptionListener */ public function onKernelException(GetResponseForExceptionEvent $event) { + // we need to remove ourselves as the exception listener can be + // different depending on the Request + $event->getDispatcher()->removeListener(KernelEvents::EXCEPTION, array($this, 'onKernelException')); + $exception = $event->getException(); $request = $event->getRequest(); |