From 404099c6782a2f5488cf5db06d4271b8ac07d86b 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 1f1edf285a..ad840d8100 100644 --- a/apps/dav/lib/Migration/RemoveClassifiedEventActivity.php +++ b/apps/dav/lib/Migration/RemoveClassifiedEventActivity.php @@ -75,6 +75,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']) @@ -105,6 +109,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'])