test for property_exists to quiet errors

This commit is contained in:
Isaac Connor 2020-09-29 16:47:49 -04:00
parent f2e4d1dd5c
commit 24d8b99eea
1 changed files with 2 additions and 2 deletions

View File

@ -293,7 +293,7 @@ class Monitor extends ZM_Object {
} }
function zmcControl( $mode=false ) { function zmcControl( $mode=false ) {
if ( ! $this->{'Id'} ) { if ( !(property_exists($this,'Id') and $this->{'Id'}) ) {
Warning('Attempt to control a monitor with no Id'); Warning('Attempt to control a monitor with no Id');
return; return;
} }
@ -346,7 +346,7 @@ class Monitor extends ZM_Object {
} // end function zmcControl } // end function zmcControl
function zmaControl($mode=false) { function zmaControl($mode=false) {
if ( !$this->{'Id'} ) { if ( ! (property_exists($this, 'Id') and $this->{'Id'}) ) {
Warning('Attempt to control a monitor with no Id'); Warning('Attempt to control a monitor with no Id');
return; return;
} }