Commit 2b0cb7be authored by Franco Fichtner's avatar Franco Fichtner

mvc: tighten previous

parent a14da189
......@@ -129,7 +129,7 @@ class InterfaceField extends BaseField
$allInterfacesDevices = array(); // mapping device -> interface handle (lan/wan/optX)
$configObj = Config::getInstance()->object();
// Iterate over all interfaces configuration and collect data
if ($configObj->interfaces->count() > 0) {
if (isset($configObj->interfaces) && $configObj->interfaces->count() > 0) {
foreach ($configObj->interfaces->children() as $key => $value) {
$allInterfaces[$key] = $value;
if (!empty($value->if)) {
......
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