summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNed Schwartz <ned@theinterned.net>2011-06-10 14:32:10 -0700
committerNed Schwartz <ned@theinterned.net>2011-06-10 14:32:10 -0700
commit21cfb28b05f4f5ed75e129ea9396952f7175bb3d (patch)
tree52a627610a6e5e45f6c9a4777a8926ee0f6a4fac
parentaf7b7e08ec666f32792e58290bebd2f8ccf8602e (diff)
downloadsymfony-security-21cfb28b05f4f5ed75e129ea9396952f7175bb3d.zip
symfony-security-21cfb28b05f4f5ed75e129ea9396952f7175bb3d.tar.gz
symfony-security-21cfb28b05f4f5ed75e129ea9396952f7175bb3d.tar.bz2
storing localized targetPath in a string as opposed to updating the attribute
-rw-r--r--Http/Firewall/LogoutListener.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/Http/Firewall/LogoutListener.php b/Http/Firewall/LogoutListener.php
index efdc4c3..2fea16d 100644
--- a/Http/Firewall/LogoutListener.php
+++ b/Http/Firewall/LogoutListener.php
@@ -69,8 +69,8 @@ class LogoutListener implements ListenerInterface
{
$request = $event->getRequest();
- $this->targetUrl = str_replace('{_locale}', $request->getSession()->getLocale(), $this->targetUrl);
-
+ $targetUrl = str_replace('{_locale}', $request->getSession()->getLocale(), $this->targetUrl);
+
if ($this->logoutPath !== $request->getPathInfo()) {
return;
}
@@ -82,7 +82,7 @@ class LogoutListener implements ListenerInterface
throw new \RuntimeException('Logout Success Handler did not return a Response.');
}
} else {
- $response = new RedirectResponse(0 !== strpos($this->targetUrl, 'http') ? $request->getUriForPath($this->targetUrl) : $this->targetUrl, 302);
+ $response = new RedirectResponse(0 !== strpos($targetUrl, 'http') ? $request->getUriForPath($targetUrl) : $targetUrl, 302);
}
// handle multiple logout attempts gracefully
@@ -96,4 +96,3 @@ class LogoutListener implements ListenerInterface
$event->setResponse($response);
}
-}