Fixed error when sat_mode is null

This commit is contained in:
Andreas
2023-07-30 09:59:38 +02:00
parent 33d469f4b8
commit 4387a5b2ed

View File

@@ -216,7 +216,7 @@ class Labels extends CI_Controller {
}
// New begin
function pretty_sat_mode($sat_mode) {
return(strlen($sat_mode) == 2 ? (strtoupper($sat_mode[0]).'/'.strtoupper($sat_mode[1])) : strtoupper($sat_mode));
return(strlen($sat_mode ?? '') == 2 ? (strtoupper($sat_mode[0]).'/'.strtoupper($sat_mode[1])) : strtoupper($sat_mode ?? ''));
}
function finalizeData($pdf, $current_callsign, &$preliminaryData, $qso_per_label) {