summaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2021-01-07 09:35:52 +0100
committerGitHub <noreply@github.com>2021-01-07 09:35:52 +0100
commit27e43d810f64f3b181a03dc1818ca6678ee6b306 (patch)
tree068b1b1a884c512fdfda50578939180878f5f358 /apps/dav
parentae2ca5b002cd90558a953fcad6ca014c37ff7b07 (diff)
parent07553f0c628edbfccf086557a4b81c61fd870cd1 (diff)
downloadnextcloud-server-27e43d810f64f3b181a03dc1818ca6678ee6b306.tar.gz
nextcloud-server-27e43d810f64f3b181a03dc1818ca6678ee6b306.zip
Merge pull request #24911 from nextcloud/fix/tasks-calendar/undefined-index-search
Tasks search: make sure we have existing indexes before using them
Diffstat (limited to 'apps/dav')
-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)));
}