mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
fix: nullpointer
This commit is contained in:
parent
923debb299
commit
6ab332e4fb
@ -493,7 +493,8 @@ trait TransactionValidation
|
||||
}
|
||||
/** @var TransactionJournal $journal */
|
||||
foreach ($transactionGroup->transactionJournals as $journal) {
|
||||
if ((int)$journal->id === (int)$transaction['transaction_journal_id']) {
|
||||
$journalId = (int)($transaction['transaction_journal_id'] ?? 0);
|
||||
if ((int)$journal->id === $journalId) {
|
||||
return $journal->transactions()->where('amount', '<', 0)->first()->account;
|
||||
}
|
||||
}
|
||||
@ -783,8 +784,8 @@ trait TransactionValidation
|
||||
private function compareAccountData(string $type, array $comparison): bool
|
||||
{
|
||||
return match ($type) {
|
||||
default => $this->compareAccountDataWithdrawal($comparison),
|
||||
'deposit' => $this->compareAccountDataDeposit($comparison),
|
||||
default => $this->compareAccountDataWithdrawal($comparison),
|
||||
'deposit' => $this->compareAccountDataDeposit($comparison),
|
||||
'transfer' => $this->compareAccountDataTransfer($comparison),
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user