diff --git a/application/models/Activators_model.php b/application/models/Activators_model.php index 687fb6aad..a3585715d 100644 --- a/application/models/Activators_model.php +++ b/application/models/Activators_model.php @@ -111,7 +111,7 @@ class Activators_model extends CI_Model $max = $row->count; } - return $max; + return ($max ?? 0); } } diff --git a/application/models/Logbooks_model.php b/application/models/Logbooks_model.php index 8b4ce1c38..28bd064da 100644 --- a/application/models/Logbooks_model.php +++ b/application/models/Logbooks_model.php @@ -252,9 +252,8 @@ class Logbooks_model extends CI_Model { } return $relationships_array; - } - else{ - return array(); + } else{ + return array(-1); // Put some default-Value here, if no relation found } } diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index 0d6930f07..b5c271f95 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -1015,11 +1015,11 @@ $($('#callsign')).on('keypress',function(e) { $station_profile = $this->stations->profile($active_station_id); $active_station_info = $station_profile->row(); - if (strpos($active_station_info->station_gridsquare, ',') !== false) { + if (strpos(($active_station_info->station_gridsquare ?? ''), ',') !== false) { $gridsquareArray = explode(',', $active_station_info->station_gridsquare); $user_gridsquare = $gridsquareArray[0]; } else { - $user_gridsquare = $active_station_info->station_gridsquare; + $user_gridsquare = ($active_station_info->station_gridsquare ?? ''); } ?> @@ -1031,7 +1031,7 @@ $($('#callsign')).on('keypress',function(e) { url: base_url + 'index.php/logbook/qralatlngjson', type: 'post', data: { -station_gridsquare != "") { ?> +station_gridsquare ?? '') != "") { ?> qra: '', config->item('locator')) { ?> qra: 'config->item('locator'); ?>',