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 1/2] 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; } From ebc751d868d9ed45d152c646a5bece3c037c040c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Agull=C3=B3?= Date: Tue, 3 Nov 2015 10:13:43 +0100 Subject: [PATCH 2/2] Write the log message on a single line againn --- .../Security/Guard/Firewall/GuardAuthenticationListener.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Symfony/Component/Security/Guard/Firewall/GuardAuthenticationListener.php b/src/Symfony/Component/Security/Guard/Firewall/GuardAuthenticationListener.php index 1a659fc1a2..ed0a36e9dc 100644 --- a/src/Symfony/Component/Security/Guard/Firewall/GuardAuthenticationListener.php +++ b/src/Symfony/Component/Security/Guard/Firewall/GuardAuthenticationListener.php @@ -78,10 +78,7 @@ class GuardAuthenticationListener implements ListenerInterface if ($event->hasResponse()) { if (null !== $this->logger) { - $this->logger->debug(sprintf( - 'The "%s" authenticator set the response. Any later authenticator will not be called', - get_class($guardAuthenticator) - )); + $this->logger->debug(sprintf('The "%s" authenticator set the response. Any later authenticator will not be called', get_class($guardAuthenticator))); } break;