Skip to content

Commit

Permalink
CalDAV/PropFilter: set empty array as default value for time-range (#…
Browse files Browse the repository at this point in the history
…1300)

* CalDAV/PropFilter: set empty array as default value for time-range

* Adjust time-range test expectations

---------

Co-authored-by: Phil Davis <phil@jankaritech.com>
  • Loading branch information
simonspa and phil-davis committed Nov 8, 2023
1 parent 89384d4 commit f0eda73
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/CalDAV/Xml/Filter/PropFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static function xmlDeserialize(Reader $reader)
'is-not-defined' => false,
'param-filters' => [],
'text-match' => null,
'time-range' => false,
'time-range' => [],
];

$att = $reader->parseAttributes();
Expand Down
8 changes: 4 additions & 4 deletions tests/Sabre/CalDAV/Xml/Request/CalendarQueryReportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,14 @@ public function testDeserializeComplex()
[
'name' => 'UID',
'is-not-defined' => false,
'time-range' => false,
'time-range' => [],
'text-match' => null,
'param-filters' => [],
],
[
'name' => 'X-PROP',
'is-not-defined' => false,
'time-range' => false,
'time-range' => [],
'text-match' => null,
'param-filters' => [
[
Expand All @@ -171,7 +171,7 @@ public function testDeserializeComplex()
[
'name' => 'X-PROP2',
'is-not-defined' => true,
'time-range' => false,
'time-range' => [],
'text-match' => null,
'param-filters' => [],
],
Expand All @@ -188,7 +188,7 @@ public function testDeserializeComplex()
[
'name' => 'X-PROP4',
'is-not-defined' => false,
'time-range' => false,
'time-range' => [],
'text-match' => [
'negate-condition' => false,
'collation' => 'i;ascii-casemap',
Expand Down

0 comments on commit f0eda73

Please sign in to comment.