Fix nullpointer

This commit is contained in:
James Cole 2023-08-08 15:55:48 +02:00
parent 02c906afe6
commit 03f39f53d8
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80

View File

@ -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);