This commit is contained in:
Je2fb 2021-12-13 09:44:00 +01:00 committed by GitHub
parent 4fe6532359
commit df9b337a57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,7 +75,7 @@ class FormAdmin
// If the language to select is not inside the list of available language and empty value is not available, we must find
// an alternative as the language code to pre-select (to avoid to have first element in list pre-selected).
if ($selected && !in_array($selected, $langs_available) && empty($showempty)) {
if ($selected && !isset($langs_available[$selected]) && empty($showempty)) {
$tmparray = explode('_', $selected);
if (!empty($tmparray[1])) {
$selected = getLanguageCodeFromCountryCode($tmparray[1]);