8000 Remove bug in locale management in listener. · mageekguy/symfony@6155583 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6155583

Browse files
author
Frédéric Hardy
committed
Remove bug in locale management in listener.
1 parent 2335dd0 commit 6155583

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

UPGRADE-2.1.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
7070
* [BC BREAK] The current locale for the user is not stored anymore in the session
7171
72-
You can simulate the old behavior by registering a listener that looks like the following:
72+
You can simulate the old behavior by registering a listener that looks like the following, if the paramater which handle locale value in the request is `_locale`:
7373
7474
```
7575
namespace XXX;
@@ -95,7 +95,7 @@
9595
}
9696

9797
if ($locale = $request->attributes->get('_locale')) {
98-
$request->getSession()->set('_locale', $request->getLocale());
98+
$request->getSession()->set('_locale', $locale);
9999
} else {
100100
$request->setDefaultLocale($request->getSession()->get('_locale', $this->defaultLocale));
101101
}

0 commit comments

Comments
 (0)
0