fix problem with html select containing 0 as key
This commit is contained in:
parent
908f5712cc
commit
4d08434d31
|
@ -405,7 +405,7 @@ function html_select_key($dom_id, $name, $rows, $selected)
|
|||
{
|
||||
$html = '<select class="form-control" id="' . $dom_id . '" name="' . $name . '">';
|
||||
foreach ($rows as $key => $row) {
|
||||
if (($key == $selected) || ($row == $selected)) {
|
||||
if (($key == $selected) || ($row === $selected)) {
|
||||
$html .= '<option value="' . $key . '" selected="selected">' . $row . '</option>';
|
||||
} else {
|
||||
$html .= '<option value="' . $key . '">' . $row . '</option>';
|
||||
|
|
Loading…
Reference in New Issue