From 07e36a85666f76991e164e99fd1b5b1a16b8f705 Mon Sep 17 00:00:00 2001 From: phl0 Date: Mon, 27 Jan 2025 14:12:40 +0100 Subject: [PATCH] Handle 2-char grids (prevent filling the error log) --- application/libraries/Qra.php | 1 + 1 file changed, 1 insertion(+) diff --git a/application/libraries/Qra.php b/application/libraries/Qra.php index 2df9a6521..acb5a3884 100644 --- a/application/libraries/Qra.php +++ b/application/libraries/Qra.php @@ -313,6 +313,7 @@ function qra2latlong($strQRA) { if ((strlen($strQRA) % 2 == 0) && (strlen($strQRA) <= 10)) { // Check if QRA is EVEN (the % 2 does that) and smaller/equal 8 $strQRA = strtoupper($strQRA); + if (strlen($strQRA) == 2) $strQRA .= "55"; // Only 2 Chars? Fill with center "55" if (strlen($strQRA) == 4) $strQRA .= "LL"; // Only 4 Chars? Fill with center "LL" as only A-R allowed if (strlen($strQRA) == 6) $strQRA .= "55"; // Only 6 Chars? Fill with center "55" if (strlen($strQRA) == 8) $strQRA .= "LL"; // Only 8 Chars? Fill with center "LL" as only A-R allowed