diff options
author | Fabien Potencier <fabien.potencier@gmail.com> | 2015-11-04 01:18:15 +0100 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2015-11-04 01:18:15 +0100 |
commit | 7c8e60751a6ea3ffd7bbf08a599bebfe32d56fa5 (patch) | |
tree | 6105d213e98041f709b7f85507ad40a6caf4ef62 | |
parent | f55a6fe9007b58469670ecd74c1b8121a31c94c5 (diff) | |
parent | 691dc886b74b347d9343e181e32c23e15a29e6aa (diff) | |
download | symfony-security-7c8e60751a6ea3ffd7bbf08a599bebfe32d56fa5.zip symfony-security-7c8e60751a6ea3ffd7bbf08a599bebfe32d56fa5.tar.gz symfony-security-7c8e60751a6ea3ffd7bbf08a599bebfe32d56fa5.tar.bz2 |
minor #16416 [Security][Guard] Check whether $this->logger is not null on GuardAuthenticationListener (aeoris, Diego Agulló)
This PR was merged into the 2.8 branch.
Discussion
----------
[Security][Guard] Check whether $this->logger is not null on GuardAuthenticationListener
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #16415
| License | MIT
| Doc PR |
Commits
-------
ebc751d Write the log message on a single line againn
713b99f Check whether $this->logger is not null on GuardAuthenticationListener
-rw-r--r-- | Guard/Firewall/GuardAuthenticationListener.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Guard/Firewall/GuardAuthenticationListener.php b/Guard/Firewall/GuardAuthenticationListener.php index 0ac7c12..ed0a36e 100644 --- a/Guard/Firewall/GuardAuthenticationListener.php +++ b/Guard/Firewall/GuardAuthenticationListener.php @@ -77,7 +77,9 @@ 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; } |