From 9aabeb1e1c9531e6324decf548b4b3d1e770655c Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Tue, 22 Aug 2023 09:18:13 +0200 Subject: [PATCH] Fix call an undefined method `Filterable::fetchRow()` error --- application/controllers/HostController.php | 5 ++--- application/controllers/ServiceController.php | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/application/controllers/HostController.php b/application/controllers/HostController.php index 09352d0..e22edde 100644 --- a/application/controllers/HostController.php +++ b/application/controllers/HostController.php @@ -55,9 +55,8 @@ class HostController extends Controller ->from('hoststatus', array('host_name')) ->where('host_name', $hostName); - /** @var DataView $restrictedQuery */ - $restrictedQuery = $this->applyRestriction('monitoring/filter/objects', $query); - if ($restrictedQuery->fetchRow() !== false) { + $this->applyRestriction('monitoring/filter/objects', $query); + if ($query->fetchRow() !== false) { $this->redirectNow(Url::fromPath('monitoring/host/show')->setParams($this->params)); } } diff --git a/application/controllers/ServiceController.php b/application/controllers/ServiceController.php index f10c791..671d00c 100644 --- a/application/controllers/ServiceController.php +++ b/application/controllers/ServiceController.php @@ -62,9 +62,8 @@ class ServiceController extends Controller ->where('host_name', $hostName) ->where('service_description', $serviceName); - /** @var DataView $restrictedQuery */ - $restrictedQuery = $this->applyRestriction('monitoring/filter/objects', $query); - if ($restrictedQuery->fetchRow() !== false) { + $this->applyRestriction('monitoring/filter/objects', $query); + if ($query->fetchRow() !== false) { $this->redirectNow(Url::fromPath('monitoring/service/show')->setParams($this->params)); } }