From 37ddae8e93fbe6dcf15dc63c7b3059717e641cae Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Wed, 9 Aug 2023 09:32:50 +0200 Subject: [PATCH] Fixes the error if HamQTH lookup does not have credentials set --- application/controllers/Logbook.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/application/controllers/Logbook.php b/application/controllers/Logbook.php index 2701e679..23f3173f 100644 --- a/application/controllers/Logbook.php +++ b/application/controllers/Logbook.php @@ -145,14 +145,14 @@ class Logbook extends CI_Controller { $measurement_base = $this->session->userdata('user_measurement_base'); } - $return['callsign_name'] = $this->nval($callbook['name'], $this->logbook_model->call_name($callsign)); - $return['callsign_qra'] = $this->nval($callbook['gridsquare'], $this->logbook_model->call_qra($callsign)); + $return['callsign_name'] = $this->nval($callbook['name'] ?? '', $this->logbook_model->call_name($callsign)); + $return['callsign_qra'] = $this->nval($callbook['gridsquare'] ?? '', $this->logbook_model->call_qra($callsign)); $return['callsign_distance'] = $this->distance($return['callsign_qra']); - $return['callsign_qth'] = $this->nval($callbook['city'], $this->logbook_model->call_qth($callsign)); - $return['callsign_iota'] = $this->nval($callbook['iota'], $this->logbook_model->call_iota($callsign)); + $return['callsign_qth'] = $this->nval($callbook['city'] ?? '', $this->logbook_model->call_qth($callsign)); + $return['callsign_iota'] = $this->nval($callbook['iota'] ?? '', $this->logbook_model->call_iota($callsign)); $return['qsl_manager'] = $this->nval($callbook['qslmgr'] ?? '', $this->logbook_model->call_qslvia($callsign)); - $return['callsign_state'] = $this->nval($callbook['state'], $this->logbook_model->call_state($callsign)); - $return['callsign_us_county'] = $this->nval($callbook['us_county'], $this->logbook_model->call_us_county($callsign)); + $return['callsign_state'] = $this->nval($callbook['state'] ?? '', $this->logbook_model->call_state($callsign)); + $return['callsign_us_county'] = $this->nval($callbook['us_county'] ?? '', $this->logbook_model->call_us_county($callsign)); $return['workedBefore'] = $this->worked_grid_before($return['callsign_qra'], $type, $band, $mode); if ($this->session->userdata('user_show_profile_image')) {