[Security] fixed a leak in ExceptionListener

This commit is contained in:
Fabien Potencier 2013-09-06 15:51:21 +02:00
parent 2fd8a7acf3
commit 899f1760a6
1 changed files with 4 additions and 0 deletions

View File

@ -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();