From 5158eec598520493e46eabe336c1e49eaa99e084 Mon Sep 17 00:00:00 2001 From: Grzegorz Surmann Date: Sat, 17 Feb 2024 03:52:08 +0100 Subject: [PATCH] error handling --- rigctld3.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rigctld3.php b/rigctld3.php index ddd1f4e..47abf04 100644 --- a/rigctld3.php +++ b/rigctld3.php @@ -1,7 +1,7 @@ RIG CONNECT... "; @@ -69,7 +69,7 @@ while ( TRUE ) { $data->request->smeter=$smet; $put=qrzcq_api_rig('put',$data); // put end - if ( $put->status != 'OK' ) { print "\nERROR: QRZCQ PUT FAILED\n"; }; + if ( !isset($put->status) || $put->status != 'OK' ) { print "\nERROR: QRZCQ PUT FAILED\n"; }; } $last_read=time(); if ( preg_match("/0$/",time()) && $freq*1 > 0 && $mode == strtoupper($mode) ) { print "ALIVE[_".number_format($freq,0,'','.')."_/".$mode."/".$wid."/".$smet."]\n"; };