Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Catch NULL.
James Colee300314e05c3
diff --git a/app/Support/JsonApi/Enrichments/PiggyBankEnrichment.php b/app/Support/JsonApi/Enrichments/PiggyBankEnrichment.phpindex 8df413ce5c..3253d75d5b 100644--- a/app/Support/JsonApi/Enrichments/PiggyBankEnrichment.php+++ b/app/Support/JsonApi/Enrichments/PiggyBankEnrichment.php@@ -102,11 +102,11 @@ class PiggyBankEnrichment implements EnrichmentInterfaceif (!array_key_exists($accountId, $this->amounts[$id])) {$this->amounts[$id][$accountId] = ['current_amount' => '0',- 'pc_current_amount' => '0',+ 'pc_current_amount' => null,];}$this->amounts[$id][$accountId]['current_amount'] = bcadd($this->amounts[$id][$accountId]['current_amount'], $item->current_amount);- if (null !== $this->amounts[$id][$accountId]['pc_current_amount']) {+ if (null !== $this->amounts[$id][$accountId]['pc_current_amount'] && null !== $item->native_current_amount) {$this->amounts[$id][$accountId]['pc_current_amount'] = bcadd($this->amounts[$id][$accountId]['pc_current_amount'], $item->native_current_amount);}}