Open adriallongarriu opened 2 years ago
I have the same issue with LocaleCookieRedirect
specially when used with config :
useAcceptLanguageHeader = true hideDefaultLocaleInURL = true
I am getting stuck in a language because LocaleCookieRedirect.php is incorrectly setting up the wrong cookie when redirecting
Describe the bug The Middleware LocaleCookieRedirect in line 59 use
$params[0]
insed of$locale
. Variable params are not validate with the funcioncheckLocaleInSupportedLocales()
this cause to store incorrect values inside cookies.https://github.com/mcamara/laravel-localization/blob/27565315c585e90d8d93aa06afd49d6a5992fe5a/src/Mcamara/LaravelLocalization/Middleware/LocaleCookieRedirect.php#L59
Expected behavior Ignore
$params[0]
if is not a supported locale and don't sotre value to cookies.More info: