Merge pull request #13503 from nextcloud/fix/13499

RemoveClassifiedEventActivity: check if calendar still exists
This commit is contained in:
Joas Schilling 2019-01-11 11:30:53 +01:00 committed by GitHub
commit e7b9746266
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -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 {
$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'])