From fbdc94cd748813614f641cc77d8a4961ce996335 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 27 Jul 2024 19:32:02 +0200 Subject: [PATCH] Fix bad position of selected option --- htdocs/core/class/html.form.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 9a1aeeb5cd0..d1c6c58d832 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -8744,7 +8744,7 @@ class Form } } else { $id = (string) $id; // if $id = 0, then $id = '0' - if ($id != '' && ($id == $key || ($id == 'ifone' && count($array) == 1)) && !$disabled) { + if ($id != '' && (($id == (string) $key) || ($id == 'ifone' && count($array) == 1)) && !$disabled) { $out .= ' selected'; // To preselect a value } }