From 2d47ee7e21a0f1fbbcd580b1182d5768d1b8152b Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 5 Sep 2019 17:46:18 +0200 Subject: [PATCH] Fix null pointer in command --- app/Console/Commands/Upgrade/MigrateRecurrenceMeta.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/Upgrade/MigrateRecurrenceMeta.php b/app/Console/Commands/Upgrade/MigrateRecurrenceMeta.php index 1e812f77f6..08817ed270 100644 --- a/app/Console/Commands/Upgrade/MigrateRecurrenceMeta.php +++ b/app/Console/Commands/Upgrade/MigrateRecurrenceMeta.php @@ -57,8 +57,6 @@ class MigrateRecurrenceMeta extends Command return 0; } - $this->warn('Congrats, you found the skeleton command. Boo!'); - $count = $this->migrateMetaData(); if (0 === $count) { @@ -106,6 +104,9 @@ class MigrateRecurrenceMeta extends Command private function migrateEntry(RecurrenceMeta $meta): int { $recurrence = $meta->recurrence; + if (null === $recurrence) { + return 0; + } $firstTransaction = $recurrence->recurrenceTransactions()->first(); if (null === $firstTransaction) { return 0;