Skip to content

Commit 1ab03a0

Browse files
authored
Merge pull request #23563 from nextcloud/backport/23497/stable20
[stable20] CalDavBackend: check if timerange is array before accessing
2 parents 5a7a0a2 + b1d3877 commit 1ab03a0

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 <[email protected]>
1717
* @author Thomas Müller <[email protected]>
1818
* @author Vinicius Cubas Brand <[email protected]>
19+
* @author Simon Spannagel <[email protected]>
1920
*
2021
* @license AGPL-3.0
2122
*
@@ -1364,7 +1365,7 @@ public function calendarQuery($calendarId, array $filters, $calendarType=self::C
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)