Skip to content

Commit 8ad1bf6

Browse files
Merge pull request #23497 from nextcloud/bugfix/noid/caldav-timerange-array
CalDavBackend: check if timerange is array before accessing
2 parents 480649f + 9956d13 commit 8ad1bf6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/dav/lib/CalDAV/CalDavBackend.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* @author Thomas Citharel <nextcloud@tcit.fr>
1717
* @author Thomas Müller <thomas.mueller@tmit.eu>
1818
* @author Vinicius Cubas Brand <vinicius@eita.org.br>
19+
* @author Simon Spannagel <simonspa@kth.se>
1920
*
2021
* @license AGPL-3.0
2122
*
@@ -1364,7 +1365,7 @@ public function calendarQuery($calendarId, array $filters, $calendarType = self:
13641365
$requirePostFilter = false;
13651366
}
13661367
// There was a time-range filter
1367-
if ($componentType === 'VEVENT' && isset($filters['comp-filters'][0]['time-range'])) {
1368+
if ($componentType === 'VEVENT' && isset($filters['comp-filters'][0]['time-range']) && is_array($filters['comp-filters'][0]['time-range'])) {
13681369
$timeRange = $filters['comp-filters'][0]['time-range'];
13691370

13701371
// If start time OR the end time is not specified, we can do a

0 commit comments

Comments
 (0)