Skip to content
Snippets Groups Projects
Unverified Commit e7b97462 authored by Joas Schilling's avatar Joas Schilling Committed by GitHub
Browse files

Merge pull request #13503 from nextcloud/fix/13499

RemoveClassifiedEventActivity: check if calendar still exists
parents 861275d1 12e24ed6
No related branches found
No related tags found
No related merge requests found
...@@ -75,6 +75,10 @@ class RemoveClassifiedEventActivity implements IRepairStep { ...@@ -75,6 +75,10 @@ class RemoveClassifiedEventActivity implements IRepairStep {
$result = $query->execute(); $result = $query->execute();
while ($row = $result->fetch()) { while ($row = $result->fetch()) {
if ($row['principaluri'] === null) {
continue;
}
$delete->setParameter('owner', $this->getPrincipal($row['principaluri'])) $delete->setParameter('owner', $this->getPrincipal($row['principaluri']))
->setParameter('type', 'calendar') ->setParameter('type', 'calendar')
->setParameter('calendar_id', $row['calendarid']) ->setParameter('calendar_id', $row['calendarid'])
...@@ -105,6 +109,10 @@ class RemoveClassifiedEventActivity implements IRepairStep { ...@@ -105,6 +109,10 @@ class RemoveClassifiedEventActivity implements IRepairStep {
$result = $query->execute(); $result = $query->execute();
while ($row = $result->fetch()) { while ($row = $result->fetch()) {
if ($row['principaluri'] === null) {
continue;
}
$delete->setParameter('owner', $this->getPrincipal($row['principaluri'])) $delete->setParameter('owner', $this->getPrincipal($row['principaluri']))
->setParameter('type', 'calendar') ->setParameter('type', 'calendar')
->setParameter('calendar_id', $row['calendarid']) ->setParameter('calendar_id', $row['calendarid'])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment