From a719325a172fa9a9887a8d255fb16d1d34e32df3 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Fri, 11 Jan 2019 09:46:55 +0100 Subject: [PATCH] Check for no longer existing calendars Signed-off-by: Roeland Jago Douma --- apps/dav/lib/Migration/RemoveClassifiedEventActivity.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/dav/lib/Migration/RemoveClassifiedEventActivity.php b/apps/dav/lib/Migration/RemoveClassifiedEventActivity.php index 07f77e57c2..0b6a4b1144 100644 --- a/apps/dav/lib/Migration/RemoveClassifiedEventActivity.php +++ b/apps/dav/lib/Migration/RemoveClassifiedEventActivity.php @@ -74,6 +74,10 @@ class RemoveClassifiedEventActivity implements IRepairStep { $result = $query->execute(); while ($row = $result->fetch()) { + if ($row['principaluri'] === null) { + continue; + } + $delete->setParameter('owner', $this->getPrincipal($row['principaluri'])) ->setParameter('type', 'calendar') ->setParameter('calendar_id', $row['calendarid']) @@ -104,6 +108,10 @@ class RemoveClassifiedEventActivity implements IRepairStep { $result = $query->execute(); while ($row = $result->fetch()) { + if ($row['principaluri'] === null) { + continue; + } + $delete->setParameter('owner', $this->getPrincipal($row['principaluri'])) ->setParameter('type', 'calendar') ->setParameter('calendar_id', $row['calendarid'])