Skip to content

Firefly III: a personal finances manager

Bugfix: array_filter preserves keys, so $filteredAccounts[0] might not exist

Ben306e1081e3b1
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);
}
/**