Fix null pointers

This commit is contained in:
James Cole
2026-01-27 18:04:31 +01:00
parent 1b68e5374a
commit 33e63434a3

View File

@@ -179,7 +179,7 @@ class TransactionJournalFactory
Log::debug('Find foreign currency or return NULL.');
$foreignCurrency = $this->currencyRepository->findCurrencyNull($row['foreign_currency_id'] ?? 0, $row['foreign_currency_code'] ?? '');
$bill = $this->billRepository->findBill(((int) $row['bill_id'] ?? 0, $row['bill_name'] ?? '');
$bill = $this->billRepository->findBill(((int) $row['bill_id'] ?? 0), $row['bill_name'] ?? '');
$billId = TransactionTypeEnum::WITHDRAWAL->value === $type->type && $bill instanceof Bill ? $bill->id : null;
$description = (string) $row['description'];