aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2020-12-30 15:35:51 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2021-01-04 20:58:15 +0100
commit07553f0c628edbfccf086557a4b81c61fd870cd1 (patch)
tree6e5606633a22b16377c4d5ac3e56bd75ce3f52c0 /apps/dav/lib
parent1f48a83b09061f3f19ec12adb37959f4eb45914c (diff)
downloadnextcloud-server-07553f0c628edbfccf086557a4b81c61fd870cd1.tar.gz
nextcloud-server-07553f0c628edbfccf086557a4b81c61fd870cd1.zip
Make sure we have existing indexes before using them
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/dav/lib')
-rw-r--r--apps/dav/lib/CalDAV/CalDavBackend.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php
index ad1eea10820..178affc46bf 100644
--- a/apps/dav/lib/CalDAV/CalDavBackend.php
+++ b/apps/dav/lib/CalDAV/CalDavBackend.php
@@ -1776,7 +1776,8 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$calendarAnd->add($calendarObjectIdQuery->expr()->eq('cob.calendartype', $calendarObjectIdQuery->createNamedParameter(self::CALENDAR_TYPE_CALENDAR)));
// If it's shared, limit search to public events
- if ($calendar['principaluri'] !== $calendar['{http://owncloud.org/ns}owner-principal']) {
+ if (isset($calendar['{http://owncloud.org/ns}owner-principal'])
+ && $calendar['principaluri'] !== $calendar['{http://owncloud.org/ns}owner-principal']) {
$calendarAnd->add($calendarObjectIdQuery->expr()->eq('co.classification', $calendarObjectIdQuery->createNamedParameter(self::CLASSIFICATION_PUBLIC)));
}
@@ -1788,7 +1789,8 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$subscriptionAnd->add($calendarObjectIdQuery->expr()->eq('cob.calendartype', $calendarObjectIdQuery->createNamedParameter(self::CALENDAR_TYPE_SUBSCRIPTION)));
// If it's shared, limit search to public events
- if ($subscription['principaluri'] !== $subscription['{http://owncloud.org/ns}owner-principal']) {
+ if (isset($subscription['{http://owncloud.org/ns}owner-principal'])
+ && $subscription['principaluri'] !== $subscription['{http://owncloud.org/ns}owner-principal']) {
$subscriptionAnd->add($calendarObjectIdQuery->expr()->eq('co.classification', $calendarObjectIdQuery->createNamedParameter(self::CLASSIFICATION_PUBLIC)));
}