From 88e40bca8df8cbe28ea0f11ea629ac471a98bba7 Mon Sep 17 00:00:00 2001 From: Friedrich Holland-Moritz Date: Tue, 28 Feb 2023 14:35:08 +0100 Subject: [PATCH] fix for issues #62 #64 #52 count(): Parameter must be an array or an object that implements Countable --- application/controllers/HandlerController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/controllers/HandlerController.php b/application/controllers/HandlerController.php index f229ee8..4a3b4f5 100644 --- a/application/controllers/HandlerController.php +++ b/application/controllers/HandlerController.php @@ -546,7 +546,7 @@ protected function handlerformAction() if ($this->apiMode == TRUE) { $object=$this->getIdoConn()->getHostGroupById($params['hostid']['val']); - if (count($object) == 0 || $params['host_name']['val'] != $object->__name) + if (empty($object) || $params['host_name']['val'] != $object->__name) { $this->_helper->json(array('status'=>"Invalid object group id : Please re enter service")); return; @@ -708,4 +708,4 @@ protected function prepareTabs() ); } -} \ No newline at end of file +}