Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix #2950
James Colebe565dd2e579
diff --git a/app/Http/Controllers/Chart/DoubleReportController.php b/app/Http/Controllers/Chart/DoubleReportController.phpindex ed0ad224d9..adb855c036 100644--- a/app/Http/Controllers/Chart/DoubleReportController.php+++ b/app/Http/Controllers/Chart/DoubleReportController.php@@ -367,18 +367,18 @@ class DoubleReportController extends Controller* @param Collection $accounts* @param int $id* @param string $name- * @param string $iban+ * @param null|string $iban** @return string*/- private function getCounterpartName(Collection $accounts, int $id, string $name, string $iban): string+ private function getCounterpartName(Collection $accounts, int $id, string $name, ?string $iban): string{/** @var Account $account */foreach ($accounts as $account) {if ($account->name === $name && $account->id !== $id) {return $account->name;}- if ($account->iban === $iban && $account->id !== $id) {+ if (null !== $account->iban && $account->iban === $iban && $account->id !== $id) {return $account->iban;}}diff --git a/app/Http/Controllers/Report/DoubleController.php b/app/Http/Controllers/Report/DoubleController.phpindex f5ebf4c8f4..69db4bf529 100644--- a/app/Http/Controllers/Report/DoubleController.php+++ b/app/Http/Controllers/Report/DoubleController.php@@ -776,18 +776,18 @@ class DoubleController extends Controller* @param Collection $accounts* @param int $id* @param string $name- * @param string $iban+ * @param string|null $iban** @return string*/- private function getCounterpartName(Collection $accounts, int $id, string $name, string $iban): string+ private function getCounterpartName(Collection $accounts, int $id, string $name, ?string $iban): string{/** @var Account $account */foreach ($accounts as $account) {if ($account->name === $name && $account->id !== $id) {return $account->name;}- if ($account->iban === $iban && $account->id !== $id) {+ if (null !== $account->iban && $account->iban === $iban && $account->id !== $id) {return $account->iban;}}