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

(legacy) fix crash report "PHP Warning: explode() expects parameter 2 to be...

(legacy) fix crash report "PHP Warning:  explode() expects parameter 2 to be string, array given in /usr/local/www/interfaces_bridge_edit.php on line 290"
parent aac0e774
...@@ -287,7 +287,15 @@ function show_source_port_range() { ...@@ -287,7 +287,15 @@ function show_source_port_range() {
<td width="78%" class="vtable"> <td width="78%" class="vtable">
<select name="members[]" multiple="multiple" class="selectpicker" size="3" data-live-search="true"> <select name="members[]" multiple="multiple" class="selectpicker" size="3" data-live-search="true">
<?php <?php
$members_array = explode(',', $pconfig['members']); // let's fix this for now in the template, although it should be fixed at the top of the page
// $pconfig['members'] can be of different type now.
if ( isset($pconfig['members']) && is_array($pconfig['members'])) {
$members_array = $pconfig['members'];
} elseif (!empty($pconfig['members'])) {
$members_array = explode(',', $pconfig['members']);
} else {
$members_array = array();
}
foreach ($ifacelist as $ifn => $ifinfo) { foreach ($ifacelist as $ifn => $ifinfo) {
echo "<option value=\"{$ifn}\""; echo "<option value=\"{$ifn}\"";
if (in_array($ifn, $members_array)) if (in_array($ifn, $members_array))
......
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