From 4feeb6c8e76bab793e992aa33bb3810d92af32b6 Mon Sep 17 00:00:00 2001 From: DB4SCW Date: Mon, 24 Nov 2025 21:07:21 +0000 Subject: [PATCH] prevent warning on first run --- application/libraries/Cbr_parser.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/libraries/Cbr_parser.php b/application/libraries/Cbr_parser.php index 607acbd45..d6b36d6b4 100644 --- a/application/libraries/Cbr_parser.php +++ b/application/libraries/Cbr_parser.php @@ -93,7 +93,7 @@ class CBR_Parser } //determine maximum qso field size - $max_qso_fields = max($max_qso_fields, count($qso_elements)); + $max_qso_fields = max($max_qso_fields ?? 0, count($qso_elements)); //find all occurrences of "59" or "599" $indices_of_59 = []; @@ -212,7 +212,7 @@ class CBR_Parser //get all remaining received exchanges $exchange_nr = 1; $startindex = ($rcvd_59_pos + ($serial_number_present ? 2 : 1)); - $endindex = $trx_number_present ? (count($line)) -1 : (count($line)); + $endindex = $trx_number_present ? (count($line) - 1) : (count($line)); for ($i = $startindex; $i < $endindex; $i++) { $qso_line["RCVD_EXCH_" . $exchange_nr] = $line[$i]; $exchange_nr++;