From b1e3cf3a20d5d046a114ab5eefda4ebff78aaef0 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 4 Feb 2023 10:46:31 +0100 Subject: [PATCH] Null check for https://github.com/firefly-iii/firefly-iii/issues/6834 --- app/Services/Internal/Support/JournalServiceTrait.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/Internal/Support/JournalServiceTrait.php b/app/Services/Internal/Support/JournalServiceTrait.php index 501c8b3e19..e57c9dc4ee 100644 --- a/app/Services/Internal/Support/JournalServiceTrait.php +++ b/app/Services/Internal/Support/JournalServiceTrait.php @@ -81,7 +81,7 @@ trait JournalServiceTrait // if result is NULL but IBAN is set, any result of the search by NAME can't overrule // this account. In such a case, the name search must be retried with a new name. - if (null !== $result && null === $numberResult && null === $ibanResult && null !== $data['iban']) { + if (null !== $result && null === $numberResult && null === $ibanResult && '' !== (string) $data['iban']) { $data['name'] = sprintf('%s (%s)', $data['name'], $data['iban']); Log::debug(sprintf('Search again using the new name, "%s".', $data['name'])); $result = $this->findAccountByName(null, $data, $expectedTypes[$transactionType]);