summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Migration
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2019-01-11 11:30:53 +0100
committerGitHub <noreply@github.com>2019-01-11 11:30:53 +0100
commite7b9746266d7a9338ff41c7cf769cac1b7892b94 (patch)
tree8305e1553ddf02baa123b62414ed3fef3d00a849 /apps/dav/lib/Migration
parent861275d10be319823e2890ddaba9298128983bc4 (diff)
parent12e24ed6e706e78190ebea1d95a7927f097003e0 (diff)
downloadnextcloud-server-e7b9746266d7a9338ff41c7cf769cac1b7892b94.tar.gz
nextcloud-server-e7b9746266d7a9338ff41c7cf769cac1b7892b94.zip
Merge pull request #13503 from nextcloud/fix/13499
RemoveClassifiedEventActivity: check if calendar still exists
Diffstat (limited to 'apps/dav/lib/Migration')
-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'])