diff options
author | Diego Agulló <aeoris@gmail.com> | 2015-11-01 23:24:34 +0100 |
---|---|---|
committer | Diego Agulló <aeoris@gmail.com> | 2015-11-01 23:24:34 +0100 |
commit | 9c311f83ce68ead35d6bf0d9dab5d75cb39eeb3d (patch) | |
tree | e43224d9fba6755e9b42be79ab6e60d886918c9e | |
parent | 55d8b7b4d774ca17405feaa645dd403abf94ba4d (diff) | |
download | symfony-security-9c311f83ce68ead35d6bf0d9dab5d75cb39eeb3d.zip symfony-security-9c311f83ce68ead35d6bf0d9dab5d75cb39eeb3d.tar.gz symfony-security-9c311f83ce68ead35d6bf0d9dab5d75cb39eeb3d.tar.bz2 |
Check whether $this->logger is not null on GuardAuthenticationListener
-rw-r--r-- | Guard/Firewall/GuardAuthenticationListener.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Guard/Firewall/GuardAuthenticationListener.php b/Guard/Firewall/GuardAuthenticationListener.php index 0ac7c12..1a659fc 100644 --- a/Guard/Firewall/GuardAuthenticationListener.php +++ b/Guard/Firewall/GuardAuthenticationListener.php @@ -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; } |