Check whether $this->logger is not null on GuardAuthenticationListener

This commit is contained in:
Diego Agulló 2015-11-01 23:24:34 +01:00
parent 64917c726d
commit 713b99fc8f

View File

@ -77,7 +77,12 @@ class GuardAuthenticationListener implements ListenerInterface
$this->executeGuardAuthenticator($uniqueGuardKey, $guardAuthenticator, $event);
if ($event->hasResponse()) {
$this->logger->debug(sprintf('The "%s" authenticator set the response. Any later authenticator will not be called', get_class($guardAuthenticator)));
if (null !== $this->logger) {
$this->logger->debug(sprintf(
'The "%s" authenticator set the response. Any later authenticator will not be called',
get_class($guardAuthenticator)
));
}
break;
}