diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-01-11 09:46:55 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-01-11 09:46:55 +0100 |
commit | 12e24ed6e706e78190ebea1d95a7927f097003e0 (patch) | |
tree | 17e8fd73f04882d1dfb2c8a586dd7420c2b57cc4 /apps | |
parent | 75b8e98f8ee7624716ea69ba26ca9806e6878b8e (diff) | |
download | nextcloud-server-12e24ed6e706e78190ebea1d95a7927f097003e0.tar.gz nextcloud-server-12e24ed6e706e78190ebea1d95a7927f097003e0.zip |
Check for no longer existing calendars
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dav/lib/Migration/RemoveClassifiedEventActivity.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/dav/lib/Migration/RemoveClassifiedEventActivity.php b/apps/dav/lib/Migration/RemoveClassifiedEventActivity.php index 1f1edf285ac..ad840d8100e 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']) |