fix: Ignore ports where we only have two entries in the array, this signals bad data #1366 (#5722)

* update to check for valid ports

* fix: Ignore ports where we only have two entries in the array, this signals bad data #1366

* Update functions.php
This commit is contained in:
Neil Lathwood
2017-02-03 19:49:40 +00:00
committed by GitHub
parent a19b2614dc
commit 7dc52654db

View File

@ -955,7 +955,10 @@ function is_port_valid($port, $device)
global $config; global $config;
if (strstr($port['ifDescr'], "irtual") && strpos($port['ifDescr'], "Virtual Services Platform") === false) { if (empty($port['ifDescr']) && empty($port['ifAlias']) && empty($port['ifName'])) {
// If these are all empty, we are just going to show blank names in the ui
$valid = 0;
} elseif (strstr($port['ifDescr'], "irtual") && strpos($port['ifDescr'], "Virtual Services Platform") === false) {
$valid = 0; $valid = 0;
} else { } else {
$valid = 1; $valid = 1;