mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix null pointer.
This commit is contained in:
parent
99f5151aab
commit
49d0ed0c1b
@ -185,7 +185,11 @@ class AccountController extends Controller
|
|||||||
// the opening balance is tricky:
|
// the opening balance is tricky:
|
||||||
$openingBalanceAmount = strval($repository->getOpeningBalanceAmount($account));
|
$openingBalanceAmount = strval($repository->getOpeningBalanceAmount($account));
|
||||||
$openingBalanceDate = $repository->getOpeningBalanceDate($account);
|
$openingBalanceDate = $repository->getOpeningBalanceDate($account);
|
||||||
|
$default = app('amount')->getDefaultCurrency();
|
||||||
$currency = $this->currencyRepos->findNull(intval($account->getMeta('currency_id')));
|
$currency = $this->currencyRepos->findNull(intval($account->getMeta('currency_id')));
|
||||||
|
if (is_null($currency)) {
|
||||||
|
$currency = $default;
|
||||||
|
}
|
||||||
|
|
||||||
$preFilled = [
|
$preFilled = [
|
||||||
'accountNumber' => $account->getMeta('accountNumber'),
|
'accountNumber' => $account->getMeta('accountNumber'),
|
||||||
|
Loading…
Reference in New Issue
Block a user