interfaces: selection weirdness for "none" value

This commit is contained in:
Franco Fichtner 2018-09-08 15:09:00 +00:00
parent a241040662
commit 0c7e9cba15

View File

@ -2512,7 +2512,7 @@ include("head.inc");
<select name="dhcp6-ia-pd-len" class="selectpicker" data-style="btn-default" id="dhcp6-ia-pd-len">
<?php
foreach(array(
'none' => 'None',
'none' => gettext('None'),
16 => '48',
15 => '49',
14 => '50',
@ -2531,7 +2531,7 @@ include("head.inc");
1 => '63',
0 => '64',
) as $bits => $length): ?>
<option value="<?=$bits;?>" <?=$bits == $pconfig['dhcp6-ia-pd-len'] ? "selected=\"selected\"" : "";?>>
<option value="<?=$bits;?>" <?= "{$bits}" === "{$pconfig['dhcp6-ia-pd-len']}" ? 'selected="selected"' : '' ?>>
<?=$length;?>
</option>
<?php