diff --git a/application/controllers/Logbook.php b/application/controllers/Logbook.php index 37f469c3..faffaef1 100644 --- a/application/controllers/Logbook.php +++ b/application/controllers/Logbook.php @@ -919,9 +919,14 @@ function worked_grid_before($gridsquare, $type, $band, $mode) } $data['callsign'] = $this->qrz->search($id, $this->session->userdata('qrz_session_key'), $this->config->item('use_fullname')); - $CI = &get_instance(); - $CI->load->model('logbook_model'); - $data['grid_worked'] = $CI->logbook_model->check_if_grid_worked_in_logbook(strtoupper(substr($data['callsign']['gridsquare'],0,4)), 0, $this->session->userdata('user_default_band')); + if (isset($data['callsign']['gridsquare'])) { + $CI = &get_instance(); + $CI->load->model('logbook_model'); + $data['grid_worked'] = $CI->logbook_model->check_if_grid_worked_in_logbook(strtoupper(substr($data['callsign']['gridsquare'],0,4)), 0, $this->session->userdata('user_default_band')); + } + if (isset($data['callsign']['error'])) { + $data['error'] = $data['callsign']['error']; + } } /*else { // Lookup using hamli $this->load->library('hamli'); diff --git a/application/libraries/Qrz.php b/application/libraries/Qrz.php index abb23bc9..f87bd5af 100755 --- a/application/libraries/Qrz.php +++ b/application/libraries/Qrz.php @@ -71,7 +71,7 @@ class Qrz { // Create XML object $xml = simplexml_load_string($xml); - if (empty($xml)) return; + if (!empty($xml->Session->Error)) return $data['error'] = $xml->Session->Error; // Return Required Fields $data['callsign'] = (string)$xml->Callsign->call; diff --git a/application/views/search/result.php b/application/views/search/result.php index 587c1c13..5e6b3274 100644 --- a/application/views/search/result.php +++ b/application/views/search/result.php @@ -3,8 +3,8 @@
Sorry, but we didn't find any past QSOs with
-