From 713b99fc8f0871f0ed81e809ddcb9e9110170092 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Agull=C3=B3?= Date: Sun, 1 Nov 2015 23:24:34 +0100 Subject: [PATCH] Check whether $this->logger is not null on GuardAuthenticationListener --- .../Guard/Firewall/GuardAuthenticationListener.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Security/Guard/Firewall/GuardAuthenticationListener.php b/src/Symfony/Component/Security/Guard/Firewall/GuardAuthenticationListener.php index 0ac7c12fef..1a659fc1a2 100644 --- a/src/Symfony/Component/Security/Guard/Firewall/GuardAuthenticationListener.php +++ b/src/Symfony/Component/Security/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; }