Commit df86acd7 authored by Ad Schellevis's avatar Ad Schellevis

(menu / interfaces) empty description check fails

parent 5700e210
...@@ -206,7 +206,7 @@ class ControllerBase extends ControllerRoot ...@@ -206,7 +206,7 @@ class ControllerBase extends ControllerRoot
$ifarr = array(); $ifarr = array();
foreach ($cnf->object()->interfaces->children() as $key => $node) { foreach ($cnf->object()->interfaces->children() as $key => $node) {
$ifarr[$key] = $node->descr ? $node->descr->__toString() : strtoupper($key); $ifarr[$key] = !empty($node->descr) ? $node->descr->__toString() : strtoupper($key);
} }
natcasesort($ifarr); natcasesort($ifarr);
$ordid = 0; $ordid = 0;
......
...@@ -20,7 +20,7 @@ $menu = new OPNsense\Base\Menu\MenuSystem(); ...@@ -20,7 +20,7 @@ $menu = new OPNsense\Base\Menu\MenuSystem();
$cnf = OPNsense\Core\Config::getInstance(); $cnf = OPNsense\Core\Config::getInstance();
$ifarr = array(); $ifarr = array();
foreach ($cnf->object()->interfaces->children() as $key => $node) { foreach ($cnf->object()->interfaces->children() as $key => $node) {
$ifarr[$key] = $node->descr ? $node->descr->__toString() : strtoupper($key); $ifarr[$key] = !empty($node->descr) ? $node->descr->__toString() : strtoupper($key);
} }
natcasesort($ifarr); natcasesort($ifarr);
$ordid = 0; $ordid = 0;
......
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