Skip to content

Firefly III: a personal finances manager

Fix null pointer.

James Colef93e55f9b024
diff --git a/app/Factory/TransactionJournalFactory.php b/app/Factory/TransactionJournalFactory.php
index e9d065fc13..a069639647 100644
--- a/app/Factory/TransactionJournalFactory.php
+++ b/app/Factory/TransactionJournalFactory.php
@@ -175,7 +175,7 @@ class TransactionJournalFactory
$order = $row['order'] ?? 0;
Log::debug('Find currency or return default.');
- $currency = $this->currencyRepository->findCurrency((int) $row['currency_id'], $row['currency_code']);
+ $currency = $this->currencyRepository->findCurrency(((int) $row['currency_id'] ?? 0), (string) ($row['currency_code'] ?? ''));
Log::debug('Find foreign currency or return NULL.');
$foreignCurrency = $this->currencyRepository->findCurrencyNull($row['foreign_currency_id'], $row['foreign_currency_code']);