diff --git a/application/controllers/Qrz.php b/application/controllers/Qrz.php index 290df4594..557a8a6b8 100644 --- a/application/controllers/Qrz.php +++ b/application/controllers/Qrz.php @@ -338,30 +338,32 @@ class Qrz extends CI_Controller { } $record['call']=str_replace("_","/",$record['call']); - $record['station_callsign']=str_replace("_","/",$record['station_callsign']); - $status = $this->logbook_model->import_check($time_on, $record['call'], $record['band'], $record['mode'], $record['station_callsign']); + $record['station_callsign']=str_replace("_","/",$record['station_callsign'] ?? ''); + if ($record['station_callsign'] ?? '' != '') { + $status = $this->logbook_model->import_check($time_on, $record['call'], $record['band'], $record['mode'], $record['station_callsign']); - if($status[0] == "Found") { - $qrz_status = $this->logbook_model->qrz_update($time_on, $record['call'], $record['band'], $qsl_date, $record['qsl_rcvd'],$record['station_callsign']); + if($status[0] == "Found") { + $qrz_status = $this->logbook_model->qrz_update($time_on, $record['call'], $record['band'], $qsl_date, $record['qsl_rcvd'],$record['station_callsign']); - $table .= ""; - $table .= "".$record['station_callsign'].""; - $table .= "".$time_on.""; - $table .= "".$record['call'].""; - $table .= "".$record['mode'].""; - $table .= "".$record['qsl_rcvd'].""; - $table .= "".$qsl_date.""; - $table .= "QSO Record: ".$status[0].""; - $table .= ""; - } else { - $table .= ""; - $table .= "".$record['station_callsign'].""; - $table .= "".$time_on.""; - $table .= "".$record['call'].""; - $table .= "".$record['mode'].""; - $table .= "".$record['qsl_rcvd'].""; - $table .= "QSO Record: ".$status[0].""; - $table .= ""; + $table .= ""; + $table .= "".$record['station_callsign'].""; + $table .= "".$time_on.""; + $table .= "".$record['call'].""; + $table .= "".$record['mode'].""; + $table .= "".$record['qsl_rcvd'].""; + $table .= "".$qsl_date.""; + $table .= "QSO Record: ".$status[0].""; + $table .= ""; + } else { + $table .= ""; + $table .= "".$record['station_callsign'].""; + $table .= "".$time_on.""; + $table .= "".$record['call'].""; + $table .= "".$record['mode'].""; + $table .= "".$record['qsl_rcvd'].""; + $table .= "QSO Record: ".$status[0].""; + $table .= ""; + } } }