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 +}