mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix null pointer in command
This commit is contained in:
parent
95181a0a6a
commit
2d47ee7e21
@ -57,8 +57,6 @@ class MigrateRecurrenceMeta extends Command
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
$this->warn('Congrats, you found the skeleton command. Boo!');
|
|
||||||
|
|
||||||
$count = $this->migrateMetaData();
|
$count = $this->migrateMetaData();
|
||||||
|
|
||||||
if (0 === $count) {
|
if (0 === $count) {
|
||||||
@ -106,6 +104,9 @@ class MigrateRecurrenceMeta extends Command
|
|||||||
private function migrateEntry(RecurrenceMeta $meta): int
|
private function migrateEntry(RecurrenceMeta $meta): int
|
||||||
{
|
{
|
||||||
$recurrence = $meta->recurrence;
|
$recurrence = $meta->recurrence;
|
||||||
|
if (null === $recurrence) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
$firstTransaction = $recurrence->recurrenceTransactions()->first();
|
$firstTransaction = $recurrence->recurrenceTransactions()->first();
|
||||||
if (null === $firstTransaction) {
|
if (null === $firstTransaction) {
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user