From 24d8b99eea88e0e5c12ed091e9fcb2a4b4c86f8f Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 29 Sep 2020 16:47:49 -0400 Subject: [PATCH] test for property_exists to quiet errors --- web/includes/Monitor.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/includes/Monitor.php b/web/includes/Monitor.php index d1bd51509..fec452551 100644 --- a/web/includes/Monitor.php +++ b/web/includes/Monitor.php @@ -293,7 +293,7 @@ class Monitor extends ZM_Object { } function zmcControl( $mode=false ) { - if ( ! $this->{'Id'} ) { + if ( !(property_exists($this,'Id') and $this->{'Id'}) ) { Warning('Attempt to control a monitor with no Id'); return; } @@ -346,7 +346,7 @@ class Monitor extends ZM_Object { } // end function zmcControl function zmaControl($mode=false) { - if ( !$this->{'Id'} ) { + if ( ! (property_exists($this, 'Id') and $this->{'Id'}) ) { Warning('Attempt to control a monitor with no Id'); return; }