diff --git a/src/Controller/Diagnostic/EqAnalyzeController.php b/src/Controller/Diagnostic/EqAnalyzeController.php index 09952406c..ed00a23c8 100644 --- a/src/Controller/Diagnostic/EqAnalyzeController.php +++ b/src/Controller/Diagnostic/EqAnalyzeController.php @@ -57,7 +57,7 @@ public static function get(&$pageData): string $eqLogics = EqLogicManager::all(); foreach ($eqLogics as $eqLogic) { - if ($eqLogic->getStatus('battery', -2) != -2) { + if ($eqLogic != null && $eqLogic->getStatus('battery', -2) != -2) { $pageData['eqAnalyzeEqLogicList'][] = $eqLogic; } } @@ -73,6 +73,8 @@ public static function get(&$pageData): string $cmdDataArray = []; foreach ($eqLogics as $eqLogic) { + if ($eqLogic == null) + continue; $cmdData = []; $cmdData['eqLogic'] = $eqLogic; $cmdData['infoCmds'] = []; @@ -80,7 +82,7 @@ public static function get(&$pageData): string $eqlogicGetCmdInfo = $eqLogic->getCmd(CmdType::INFO); foreach ($eqlogicGetCmdInfo as $cmd) { - if (count($cmd->getConfiguration('actionCheckCmd', [])) > 0) { + if ($cmd != null && count($cmd->getConfiguration('actionCheckCmd', [])) > 0) { $data = []; $data['cmd'] = $cmd; $data['actions'] = []; @@ -121,6 +123,8 @@ public static function get(&$pageData): string $eqLogicManagerAll = EqLogicManager::all(); foreach ($eqLogicManagerAll as $eqLogic) { + if ($eqLogic == null) + continue; $hasSomeAlerts = 0; $listCmds = [];