Skip to content

Commit 8d72a1f

Browse files
committed
minor #6256 Fixed code example (twifty)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #6256). Discussion ---------- Fixed code example The new subscriber must be called after the default listener. The default sets the locale as ````php $locale = $request->attributes->get('_locale'); $request->setLocale($locale); ```` which overwrites any local set before it. Commits ------- 50bca94 Fixed code example
2 parents 66f035b + 50bca94 commit 8d72a1f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cookbook/session/locale_sticky_session.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ how you determine the desired locale from the request::
5454
public static function getSubscribedEvents()
5555
{
5656
return array(
57-
// must be registered before the default Locale listener
58-
KernelEvents::REQUEST => array(array('onKernelRequest', 17)),
57+
// must be registered after the default Locale listener
58+
KernelEvents::REQUEST => array(array('onKernelRequest', 15)),
5959
);
6060
}
6161
}

0 commit comments

Comments
 (0)