From 0b6877a20ed2ea051be7b1aaf8d332d1b074e336 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 24 Mar 2024 14:11:30 +0100 Subject: [PATCH] Fix null pointer --- app/Transformers/V2/AccountTransformer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Transformers/V2/AccountTransformer.php b/app/Transformers/V2/AccountTransformer.php index 74266fa6c5..82cc109cc8 100644 --- a/app/Transformers/V2/AccountTransformer.php +++ b/app/Transformers/V2/AccountTransformer.php @@ -179,7 +179,7 @@ class AccountTransformer extends AbstractTransformer // no currency? use default $currency = $this->default; - if (array_key_exists($id, $this->accountMeta) && 0 !== (int)$this->accountMeta[$id]['currency_id']) { + if (array_key_exists($id, $this->accountMeta) && 0 !== (int)($this->accountMeta[$id]['currency_id'] ?? 0)) { $currency = $this->currencies[(int)$this->accountMeta[$id]['currency_id']]; } // amounts and calculation.