diff --git a/archive/mibew-operator-status-plugin.tar.gz b/archive/mibew-operator-status-plugin.tar.gz index 4cd487d..aeea410 100644 Binary files a/archive/mibew-operator-status-plugin.tar.gz and b/archive/mibew-operator-status-plugin.tar.gz differ diff --git a/archive/mibew-operator-status-plugin.zip b/archive/mibew-operator-status-plugin.zip index 0706fc5..1905250 100644 Binary files a/archive/mibew-operator-status-plugin.zip and b/archive/mibew-operator-status-plugin.zip differ diff --git a/src/Controller/OperatorStatusController.php b/src/Controller/OperatorStatusController.php index c430dfb..314ddf6 100644 --- a/src/Controller/OperatorStatusController.php +++ b/src/Controller/OperatorStatusController.php @@ -46,9 +46,15 @@ class OperatorStatusController extends AbstractController $opcode = $request->query->get('code', false); $online_operators = get_online_operators(); - foreach ($online_operators as $item) { - if ($item['code'] == $opcode) { + if (count($online_operators) > 0) { + if (empty($opcode)) { $is_online = "true"; + } else { + foreach ($online_operators as $item) { + if ($item['code'] == $opcode) { + $is_online = "true"; + } + } } } $response = new Response($is_online);