From 03f39f53d80ddb36ecde513636a2a880f183c4be Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 8 Aug 2023 15:55:48 +0200 Subject: [PATCH] Fix nullpointer --- app/Api/V2/Controllers/Summary/BasicController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Api/V2/Controllers/Summary/BasicController.php b/app/Api/V2/Controllers/Summary/BasicController.php index 9a3dec5fb7..ef5928819f 100644 --- a/app/Api/V2/Controllers/Summary/BasicController.php +++ b/app/Api/V2/Controllers/Summary/BasicController.php @@ -408,7 +408,7 @@ class BasicController extends Controller // either an amount was budgeted or 0 is available. $currency = $currencies[$currencyId] ?? $this->currencyRepos->find($currencyId); $currencies[$currencyId] = $currency; - $amount = $available[$currencyId] ?? '0'; + $amount = $available[$currencyId]['amount'] ?? '0'; $amountNative = $converter->convert($default, $currency, $start, $amount); $left = bcadd($amount, $spent); $leftNative = bcadd($amountNative, $spentNative);