From f51f1b4200f7437f7558cd238dfb4f33c77486d5 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 6 Nov 2024 12:20:48 -0500 Subject: [PATCH] If no group id don't do sql lookup --- web/includes/Group.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/includes/Group.php b/web/includes/Group.php index 65f4a3ce5..b53a2dc3b 100644 --- a/web/includes/Group.php +++ b/web/includes/Group.php @@ -49,6 +49,10 @@ class Group extends ZM_Object { public function MonitorIds( ) { if (!property_exists($this, 'MonitorIds')) { + if (!$this->{'Id'}) { + return $this->{'MonitorIds'} = []; + } + if (!isset($monitor_ids_cache[$this->{'Id'}])) { $monitor_ids_cache[$this->{'Id'}] = dbFetchAll('SELECT `MonitorId` FROM `Groups_Monitors` WHERE `GroupId`=?', 'MonitorId', array($this->{'Id'})); if (count($this->Children())) {