@@ -76,8 +76,10 @@ if ( ! is_array($languages) ) { | |||
$languages = [$languages]; | |||
} | |||
$f3->set('default_lang', array_shift($languages)); | |||
if (in_array(strtolower($f3->get('GET.lang')), $languages)) { | |||
$f3->set('LANG', strtolower($f3->get('GET.lang'))); | |||
$getLang = null !== $f3->get('GET.lang') ? strtolower($f3->get('GET.lang')) : false; | |||
if (isset($getLang) && in_array($getLang, $languages)) { | |||
$f3->set('LANG', $getLang); | |||
} else { | |||
$f3->set('LANG', $f3->get('default_lang')); | |||
} |