check for session before trying to authentication details

This commit is contained in:
Matt Lehner 2011-08-22 10:40:30 -04:00 committed by Fabien Potencier
parent 648fae7746
commit 7cfc3923b6

View File

@ -91,6 +91,10 @@ class ContextListener implements ListenerInterface
if (HttpKernelInterface::MASTER_REQUEST !== $event->getRequestType()) {
return;
}
if (!$event->getRequest()->hasSession()) {
return;
}
if (null === $token = $this->context->getToken()) {
return;