mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-18 02:25:05 +00:00
firewall_nat_edit.php fix "PHP Warning: in_array() expects parameter 2 to be array, null given in /usr/local/www/firewall_nat_edit.php on line 542" when interface is missing, closes https://github.com/opnsense/core/pull/4407
This commit is contained in:
parent
e7c01545bf
commit
327850e1b0
@ -539,7 +539,7 @@ $( document ).ready(function() {
|
||||
<select name="interface[]" class="selectpicker" data-width="auto" data-live-search="true" multiple="multiple">
|
||||
<?php
|
||||
foreach (legacy_config_get_interfaces(array("enable" => true)) as $iface => $ifdetail): ?>
|
||||
<option value="<?=$iface;?>" <?= in_array($iface, $pconfig['interface']) ? "selected=\"selected\"" : ""; ?>>
|
||||
<option value="<?=$iface;?>" <?= in_array($iface, $pconfig['interface'] ?? []) ? "selected=\"selected\"" : ""; ?>>
|
||||
<?=htmlspecialchars($ifdetail['descr']);?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user