interfaces: fix a crash report

This commit is contained in:
Franco Fichtner 2016-04-01 07:06:10 +02:00
parent fe2abc94f1
commit beab33e579

View File

@ -138,6 +138,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$input_errors[] = gettext("Please choose a Link Type.");
break;
}
if (!isset($pconfig['ports'])) {
$pconfig = array();
}
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.");
}
@ -163,7 +168,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
}
}
foreach($pconfig['ports'] as $iface_idx => $iface){
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);