Commit e9d0bd1a authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(legacy) fix for PHP Warning: in_array() expects parameter 2 to be array,...

(legacy) fix for PHP Warning:  in_array() expects parameter 2 to be array, null given in /usr/local/www/interfaces_bridge_edit.php on line 605

(cherry picked from commit 2ed6e9b1)
parent 87317f8f
...@@ -259,7 +259,7 @@ $(document).ready(function() { ...@@ -259,7 +259,7 @@ $(document).ready(function() {
<select name="members[]" multiple="multiple" class="selectpicker" data-size="5" data-live-search="true"> <select name="members[]" multiple="multiple" class="selectpicker" data-size="5" data-live-search="true">
<?php <?php
foreach ($ifacelist as $ifn => $ifinfo):?> foreach ($ifacelist as $ifn => $ifinfo):?>
<option value="<?=$ifn;?>" <?=in_array($ifn, $pconfig['members']) ? "selected=\"selected\"" : "";?>> <option value="<?=$ifn;?>" <?=!empty($pconfig['members']) && in_array($ifn, $pconfig['members']) ? "selected=\"selected\"" : "";?>>
<?=$ifinfo;?> <?=$ifinfo;?>
</option> </option>
<?php <?php
...@@ -330,7 +330,7 @@ $(document).ready(function() { ...@@ -330,7 +330,7 @@ $(document).ready(function() {
<select name="stp[]" class="selectpicker" multiple="multiple" size="3" data-live-search="true"> <select name="stp[]" class="selectpicker" multiple="multiple" size="3" data-live-search="true">
<?php <?php
foreach ($ifacelist as $ifn => $ifdescr):?> foreach ($ifacelist as $ifn => $ifdescr):?>
<option value="<?$ifn;?>" <?=in_array($ifn, $pconfig['stp']) ? "selected=\"selected\"" : "";?> > <option value="<?$ifn;?>" <?=!empty($pconfig['stp']) && in_array($ifn, $pconfig['stp']) ? "selected=\"selected\"" : "";?> >
<?=$ifdescr;?> <?=$ifdescr;?>
</option> </option>
<?php <?php
...@@ -503,7 +503,7 @@ $(document).ready(function() { ...@@ -503,7 +503,7 @@ $(document).ready(function() {
<select name="edge[]" class="selectpicker" multiple="multiple" size="3" data-live-search="true"> <select name="edge[]" class="selectpicker" multiple="multiple" size="3" data-live-search="true">
<?php <?php
foreach ($ifacelist as $ifn => $ifdescr):?> foreach ($ifacelist as $ifn => $ifdescr):?>
<option value="<?=$ifn;?>" <?=in_array($ifn, $pconfig['edge']) ? "selected=\"selected\"" : "";?>> <option value="<?=$ifn;?>" <?=!empty($pconfig['edge']) && in_array($ifn, $pconfig['edge']) ? "selected=\"selected\"" : "";?>>
<?=$ifdescr;?> <?=$ifdescr;?>
</option> </option>
<?php <?php
...@@ -522,7 +522,7 @@ $(document).ready(function() { ...@@ -522,7 +522,7 @@ $(document).ready(function() {
<select name="autoedge[]" class="selectpicker" multiple="multiple" size="3" data-live-search="true"> <select name="autoedge[]" class="selectpicker" multiple="multiple" size="3" data-live-search="true">
<?php <?php
foreach ($ifacelist as $ifn => $ifdescr):?> foreach ($ifacelist as $ifn => $ifdescr):?>
<option value="<?=$ifn;?>" <?=in_array($ifn, $pconfig['autoedge']) ? "selected=\"selected\"" : "";?>> <option value="<?=$ifn;?>" <?=!empty($pconfig['autoedge']) && in_array($ifn, $pconfig['autoedge']) ? "selected=\"selected\"" : "";?>>
<?=$ifdescr;?> <?=$ifdescr;?>
</option> </option>
<?php <?php
...@@ -542,7 +542,7 @@ $(document).ready(function() { ...@@ -542,7 +542,7 @@ $(document).ready(function() {
<select name="ptp[]" class="selectpicker" multiple="multiple" size="3" data-live-search="true"> <select name="ptp[]" class="selectpicker" multiple="multiple" size="3" data-live-search="true">
<?php <?php
foreach ($ifacelist as $ifn => $ifdescr):?> foreach ($ifacelist as $ifn => $ifdescr):?>
<option value="<?=$ifn;?>" <?=in_array($ifn, $pconfig['ptp']) ? "selected=\"selected\"" : "";?>> <option value="<?=$ifn;?>" <?=!empty($pconfig['ptp']) && in_array($ifn, $pconfig['ptp']) ? "selected=\"selected\"" : "";?>>
<?=$ifdescr;?> <?=$ifdescr;?>
</option> </option>
<?php <?php
...@@ -561,7 +561,7 @@ $(document).ready(function() { ...@@ -561,7 +561,7 @@ $(document).ready(function() {
<select name="autoptp[]" class="selectpicker" multiple="multiple" size="3" data-live-search="true"> <select name="autoptp[]" class="selectpicker" multiple="multiple" size="3" data-live-search="true">
<?php <?php
foreach ($ifacelist as $ifn => $ifdescr):?> foreach ($ifacelist as $ifn => $ifdescr):?>
<option value="<?=$ifn;?>" <?=in_array($ifn, $pconfig['autoptp']) ? "selected=\"selected\"" : "";?>> <option value="<?=$ifn;?>" <?=!empty($pconfig['autoptp']) && in_array($ifn, $pconfig['autoptp']) ? "selected=\"selected\"" : "";?>>
<?=$ifdescr;?> <?=$ifdescr;?>
</option> </option>
<?php <?php
...@@ -582,7 +582,7 @@ $(document).ready(function() { ...@@ -582,7 +582,7 @@ $(document).ready(function() {
<select name="static[]" class="selectpicker" multiple="multiple" size="3" data-live-search="true"> <select name="static[]" class="selectpicker" multiple="multiple" size="3" data-live-search="true">
<?php <?php
foreach ($ifacelist as $ifn => $ifdescr):?> foreach ($ifacelist as $ifn => $ifdescr):?>
<option value="<?=$ifn;?>" <?=in_array($ifn, $pconfig['static']) ? "selected=\"selected\"" : "";?>> <option value="<?=$ifn;?>" <?=!empty($pconfig['static']) && in_array($ifn, $pconfig['static']) ? "selected=\"selected\"" : "";?>>
<?=$ifdescr;?> <?=$ifdescr;?>
</option> </option>
<?php <?php
...@@ -602,7 +602,7 @@ $(document).ready(function() { ...@@ -602,7 +602,7 @@ $(document).ready(function() {
<select name="private[]" class="selectpicker" multiple="multiple" size="3" data-live-search="true"> <select name="private[]" class="selectpicker" multiple="multiple" size="3" data-live-search="true">
<?php <?php
foreach ($ifacelist as $ifn => $ifdescr):?> foreach ($ifacelist as $ifn => $ifdescr):?>
<option value="<?=$ifn;?>" <?=in_array($ifn, $pconfig['private']) ? "selected=\"selected\"" : "";?>> <option value="<?=$ifn;?>" <?=!empty($pconfig['private']) && in_array($ifn, $pconfig['private']) ? "selected=\"selected\"" : "";?>>
<?=$ifdescr;?> <?=$ifdescr;?>
</option> </option>
<?php <?php
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment