summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-01-11 09:46:55 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2019-01-11 09:46:55 +0100
commit12e24ed6e706e78190ebea1d95a7927f097003e0 (patch)
tree17e8fd73f04882d1dfb2c8a586dd7420c2b57cc4 /apps
parent75b8e98f8ee7624716ea69ba26ca9806e6878b8e (diff)
downloadnextcloud-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.php8
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'])