mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-04 03:43:07 +00:00
Catch null pointer
This commit is contained in:
@@ -60,9 +60,11 @@ class DeleteTransaction implements ActionInterface
|
||||
|
||||
// trigger delete factory:
|
||||
$journal = TransactionJournal::find($journal['transaction_group_id']);
|
||||
/** @var JournalDestroyService $service */
|
||||
$service = app(JournalDestroyService::class);
|
||||
$service->destroy($journal);
|
||||
if (null !== $journal) {
|
||||
/** @var JournalDestroyService $service */
|
||||
$service = app(JournalDestroyService::class);
|
||||
$service->destroy($journal);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user