Skip to content

Commit

Permalink
Update CalendarQueryValidator.php
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilZ-cwm6 committed Jan 11, 2021
1 parent 66c4a98 commit 9d29581
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/CalDAV/CalendarQueryValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,15 @@ protected function validatePropFilters(VObject\Component $parent, array $filters

if ($filter['time-range']) {
foreach ($parent->{$filter['name']} as $subComponent) {
if ($this->validateTimeRange($subComponent, $filter['time-range']['start'], $filter['time-range']['end'])) {
$start = null;
$end = null;
if (array_key_exists('start', $filter['time-range'])) {
$start = $filter['time-range']['start'];
}
if (array_key_exists('end', $filter['time-range'])) {
$end = $filter['time-range']['end'];
}
if ($this->validateTimeRange($subComponent, $start, $end)) {
continue 2;
}
}
Expand Down

0 comments on commit 9d29581

Please sign in to comment.