From 31c1e28c7608b3673e67e7d89826ab201a0f1a77 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 20 Dec 2025 08:08:20 +0100 Subject: [PATCH] Add message. --- app/Support/Amount.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Support/Amount.php b/app/Support/Amount.php index 5bb7815df0..ecdcd3c944 100644 --- a/app/Support/Amount.php +++ b/app/Support/Amount.php @@ -333,6 +333,10 @@ class Amount public function getTransactionCurrencyById(int $currencyId): TransactionCurrency { + if(0 === $currencyId) { + Log::debug('Could never find a currency with ID zero. Throw error.'); + throw new FireflyException('Could never find a currency with ID zero. Throw error.'); + } $instance = PreferencesSingleton::getInstance(); $key = sprintf('transaction_currency_%d', $currencyId);