From 41aef1056e4dc5afb142f58848b0bc96dac5b42a Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 12 May 2017 10:20:50 +0200 Subject: [PATCH] mvc: another of those crashes --- .../OPNsense/Diagnostics/Api/SystemhealthController.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/opnsense/mvc/app/controllers/OPNsense/Diagnostics/Api/SystemhealthController.php b/src/opnsense/mvc/app/controllers/OPNsense/Diagnostics/Api/SystemhealthController.php index 5479c8c87..3c1f9345b 100644 --- a/src/opnsense/mvc/app/controllers/OPNsense/Diagnostics/Api/SystemhealthController.php +++ b/src/opnsense/mvc/app/controllers/OPNsense/Diagnostics/Api/SystemhealthController.php @@ -1,7 +1,7 @@ object(); - if ($config->interfaces != null) { + if ($config->interfaces->count() > 0) { foreach ($config->interfaces->children() as $key => $node) { $intfmap[(string)$key] = array("descr" => !empty((string)$node->descr) ? (string)$node->descr : $key); }