Skip to content

Commit

Permalink
bug #17049 Fix the logout path when not using the router (stof)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.7 branch.

Discussion
----------

Fix the logout path when not using the router

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #17029
| License       | MIT
| Doc PR        | n/a

This needs to use the base url, not the base path, so that it goes through the front controller when not using url rewriting.

Similar to #17048, but in the new code location

Commits
-------

542b877 Fix the logout path when not using the router
  • Loading branch information
nicolas-grekas committed Dec 18, 2015
2 parents 2d48af7 + 542b877 commit 6499a2c
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -121,7 +121,7 @@ private function generateLogoutUrl($key, $referenceType)

$request = $this->requestStack->getCurrentRequest();

$url = UrlGeneratorInterface::ABSOLUTE_URL === $referenceType ? $request->getUriForPath($logoutPath) : $request->getBasePath().$logoutPath;
$url = UrlGeneratorInterface::ABSOLUTE_URL === $referenceType ? $request->getUriForPath($logoutPath) : $request->getBaseUrl().$logoutPath;

if (!empty($parameters)) {
$url .= '?'.http_build_query($parameters);
Expand Down

0 comments on commit 6499a2c

Please sign in to comment.