aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CalDAV
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2021-11-11 13:26:53 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2021-11-11 13:31:32 +0100
commit603a88f2ee81594d9d0169a282ebb0bad7e291c4 (patch)
tree6e91da84b08bb0f623e1aef623e62d6773710bd4 /apps/dav/lib/CalDAV
parent92d4844e0b0ff09bf22ef738d452beb0e63d63eb (diff)
downloadnextcloud-server-603a88f2ee81594d9d0169a282ebb0bad7e291c4.tar.gz
nextcloud-server-603a88f2ee81594d9d0169a282ebb0bad7e291c4.zip
Fix loading all principal calendars in the dav app calendar provider
If we load all calendar infos of a principal then we get back an array and not a single calendar info. This was handled incorrectly and an array of calendar infos were passed to the calendar implementation, resulting in interesting bugs. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/dav/lib/CalDAV')
-rw-r--r--apps/dav/lib/CalDAV/CalendarProvider.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/dav/lib/CalDAV/CalendarProvider.php b/apps/dav/lib/CalDAV/CalendarProvider.php
index 30eb6ae4268..85ead6117a6 100644
--- a/apps/dav/lib/CalDAV/CalendarProvider.php
+++ b/apps/dav/lib/CalDAV/CalendarProvider.php
@@ -49,7 +49,7 @@ class CalendarProvider implements ICalendarProvider {
public function getCalendars(string $principalUri, array $calendarUris = []): array {
$calendarInfos = [];
if (empty($calendarUris)) {
- $calendarInfos[] = $this->calDavBackend->getCalendarsForUser($principalUri);
+ $calendarInfos = $this->calDavBackend->getCalendarsForUser($principalUri);
} else {
foreach ($calendarUris as $calendarUri) {
$calendarInfos[] = $this->calDavBackend->getCalendarByUri($principalUri, $calendarUri);