From 2ec8418ddd3d378c5145baeb0becd4ae69b5a9b6 Mon Sep 17 00:00:00 2001 From: Dominic Richter Date: Fri, 26 Nov 2021 00:22:49 +0100 Subject: [PATCH] hotfix: restore deleted if clause --- lib/Jejik/MT940/Parser/AbstractParser.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Jejik/MT940/Parser/AbstractParser.php b/lib/Jejik/MT940/Parser/AbstractParser.php index 15d2eb6..bc3f28e 100644 --- a/lib/Jejik/MT940/Parser/AbstractParser.php +++ b/lib/Jejik/MT940/Parser/AbstractParser.php @@ -189,9 +189,11 @@ protected function getTransactionLines(string $text): ?array if (count($amountLine) === 0 && count($multiPurposeField) === 0) { return $result; } + if ($amountLine[1] === null) { + return $result; + } $count = count($amountLine[1]); - for ($i = 0; $i < $count; $i++) { $result[$i][] = trim($amountLine[1][$i]); $result[$i][] = trim(str_replace(':86:', '', $multiPurposeField[1][$i]));