diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2021-11-11 10:53:11 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2021-11-11 10:53:11 +0100 |
commit | 53cc26e0be56996bef4c661862a3b24f1a6a4a03 (patch) | |
tree | e2b49434402dd80716ced8e0c259f1eb4a4974fa /lib | |
parent | 92d4844e0b0ff09bf22ef738d452beb0e63d63eb (diff) | |
download | nextcloud-server-53cc26e0be56996bef4c661862a3b24f1a6a4a03.tar.gz nextcloud-server-53cc26e0be56996bef4c661862a3b24f1a6a4a03.zip |
Fix initialization of calendar search URIs
They are an empty array by default. If you don't initialize then
accessing them via the setter will throw a type error.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Calendar/CalendarQuery.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/private/Calendar/CalendarQuery.php b/lib/private/Calendar/CalendarQuery.php index 6b4e2b3be16..0569b66b616 100644 --- a/lib/private/Calendar/CalendarQuery.php +++ b/lib/private/Calendar/CalendarQuery.php @@ -47,8 +47,8 @@ class CalendarQuery implements ICalendarQuery { /** @var int|null */ private $limit; - /** @var array */ - private $calendarUris; + /** @var string[] */ + private $calendarUris = []; public function __construct(string $principalUri) { $this->principalUri = $principalUri; @@ -86,6 +86,9 @@ class CalendarQuery implements ICalendarQuery { $this->calendarUris[] = $calendarUri; } + /** + * @return string[] + */ public function getCalendarUris(): array { return $this->calendarUris; } |