From 306e1081e3b13f4cf5ee5de9e7f079e543d56439 Mon Sep 17 00:00:00 2001 From: Ben Date: Fri, 5 Oct 2018 16:19:48 +0200 Subject: [PATCH] Bugfix: array_filter preserves keys, so $filteredAccounts[0] might not exist --- app/Support/FinTS/FinTS.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Support/FinTS/FinTS.php b/app/Support/FinTS/FinTS.php index 47931fb77c..d5dba345ee 100644 --- a/app/Support/FinTS/FinTS.php +++ b/app/Support/FinTS/FinTS.php @@ -73,7 +73,7 @@ class FinTS if (count($filteredAccounts) != 1) { throw new FireflyException("Cannot find account with number " . $accountNumber); } - return $filteredAccounts[0]; + return reset($filteredAccounts); } /**