Commit beab33e5 authored by Franco Fichtner's avatar Franco Fichtner

interfaces: fix a crash report

parent fe2abc94
...@@ -138,6 +138,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -138,6 +138,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$input_errors[] = gettext("Please choose a Link Type."); $input_errors[] = gettext("Please choose a Link Type.");
break; break;
} }
if (!isset($pconfig['ports'])) {
$pconfig = array();
}
if ($pconfig['type'] == "ppp" && count($pconfig['ports']) > 1) { if ($pconfig['type'] == "ppp" && count($pconfig['ports']) > 1) {
$input_errors[] = gettext("Multilink connections (MLPPP) using the PPP link type is not currently supported. Please select only one Link Interface."); $input_errors[] = gettext("Multilink connections (MLPPP) using the PPP link type is not currently supported. Please select only one Link Interface.");
} }
...@@ -163,7 +168,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -163,7 +168,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
} }
} }
foreach($pconfig['ports'] as $iface_idx => $iface){ foreach($pconfig['ports'] as $iface_idx => $iface){
if (!empty($pconfig['localip'][$iface_idx]) && !is_ipaddr($pconfig['localip'][$iface_idx])) { if (!empty($pconfig['localip'][$iface_idx]) && !is_ipaddr($pconfig['localip'][$iface_idx])) {
$input_errors[] = sprintf(gettext("A valid local IP address must be specified for %s."),$iface); $input_errors[] = sprintf(gettext("A valid local IP address must be specified for %s."),$iface);
......
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