From 13b17fa0dad1a46eb36d735f5d31e4c510f36519 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 19 Dec 2021 20:28:27 +0100 Subject: [PATCH] FIX #19564 --- htdocs/core/class/html.formadmin.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php index 13619fe5aa3..05c5fe3a9ea 100644 --- a/htdocs/core/class/html.formadmin.class.php +++ b/htdocs/core/class/html.formadmin.class.php @@ -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 && !array_key_exists($selected, $langs_available) && empty($showempty)) { $tmparray = explode('_', $selected); if (!empty($tmparray[1])) { $selected = getLanguageCodeFromCountryCode($tmparray[1]);