fix create option trait

This commit is contained in:
Билай Станислав 2024-12-25 12:44:14 +03:00
parent 46564f9450
commit 3dd054b298

View File

@ -19,7 +19,11 @@ trait CreateOption
}
} else {
foreach ($options as $val => $title) {
$selected = (int)$value === $val ? "selected" : "";
if (is_numeric($value)) {
$selected = (int)$value === $val ? "selected" : "";
} else {
$selected = $value === $val ? "selected" : "";
}
$optionsString .= "<option $selected value='$val'>$title</option>";
}
}