From 615558394ac1720053dc91cbb207c1d74cda0781 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fre=CC=81de=CC=81ric=20Hardy?= Date: Tue, 3 Jul 2012 16:15:48 +0200 Subject: [PATCH] Remove bug in locale management in listener. --- UPGRADE-2.1.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UPGRADE-2.1.md b/UPGRADE-2.1.md index 68eee7e8aa..a1077fd794 100644 --- a/UPGRADE-2.1.md +++ b/UPGRADE-2.1.md @@ -69,7 +69,7 @@ * [BC BREAK] The current locale for the user is not stored anymore in the session - You can simulate the old behavior by registering a listener that looks like the following: + 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`: ``` namespace XXX; @@ -95,7 +95,7 @@ } if ($locale = $request->attributes->get('_locale')) { - $request->getSession()->set('_locale', $request->getLocale()); + $request->getSession()->set('_locale', $locale); } else { $request->setDefaultLocale($request->getSession()->get('_locale', $this->defaultLocale)); }