Fix issue with locale cookie

This commit is contained in:
Simon Vieille 2017-08-11 10:57:57 +02:00
parent 91cdb2341c
commit a478fb3de5

View file

@ -50,7 +50,7 @@ $app->get('/', function (Request $request) use ($app) {
$foundLocale = $app['translator']->getLocale(); $foundLocale = $app['translator']->getLocale();
foreach ($app['locales'] as $locale) { foreach ($app['locales'] as $locale) {
if ($cookie === $locale || $accept->has($locale)) { if ($cookieValue === $locale || $accept->has($locale)) {
$foundLocale = $locale; $foundLocale = $locale;
break; break;
} }