mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Fix preselection when key is '0'
This commit is contained in:
@@ -6178,7 +6178,7 @@ class Form
|
||||
foreach ($array as $key => $value)
|
||||
{
|
||||
$out.= '<option value="'.$key.'"';
|
||||
if (is_array($selected) && ! empty($selected) && in_array($key, $selected) && !empty($key))
|
||||
if (is_array($selected) && ! empty($selected) && in_array($key, $selected) && ((string) $key != ''))
|
||||
{
|
||||
$out.= ' selected';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user