From 5ac5d6088071a9bbbd53fbe060d4e2270902c743 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Mon, 7 Jun 2021 17:28:26 +0100 Subject: [PATCH] Handles issue with QSO info popup with lat long errors #1058 --- application/views/view_log/qso.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/application/views/view_log/qso.php b/application/views/view_log/qso.php index a80dafbb9..4b4b3569a 100644 --- a/application/views/view_log/qso.php +++ b/application/views/view_log/qso.php @@ -101,7 +101,7 @@ - COL_GRIDSQUARE != null) { ?> + COL_GRIDSQUARE != null && strlen($row->COL_GRIDSQUARE) >= 4) { ?> lang->line('general_total_distance'); //Total distance ?> @@ -428,18 +428,23 @@ COL_GRIDSQUARE != null) { - $stn_loc = $this->qra->qra2latlong(trim($row->COL_GRIDSQUARE)); - $lat = $stn_loc[0]; - $lng = $stn_loc[1]; + if($row->COL_GRIDSQUARE != null && strlen($row->COL_GRIDSQUARE) >= 4) { + $stn_loc = $this->qra->qra2latlong(trim($row->COL_GRIDSQUARE)); + if($stn_loc[0] != 0) { + $lat = $stn_loc[0]; + $lng = $stn_loc[1]; + } } else { $CI =& get_instance(); $CI->load->model('Logbook_model'); $result = $CI->Logbook_model->dxcc_lookup($row->COL_CALL, $row->COL_TIME_ON); + + if(isset($result)) { $lat = $result['lat']; $lng = $result['long']; + } } ?>