diff --git a/apps/dav/lib/CalDAV/EventReaderRRule.php b/apps/dav/lib/CalDAV/EventReaderRRule.php index 965abb4c9cd24..fa47930caa801 100644 --- a/apps/dav/lib/CalDAV/EventReaderRRule.php +++ b/apps/dav/lib/CalDAV/EventReaderRRule.php @@ -57,23 +57,23 @@ public function concludesOn(): DateTime | null { } public function daysOfWeek(): array { - return $this->byDay; + return is_array($this->byDay) ? $this->byDay : []; } public function daysOfMonth(): array { - return $this->byMonthDay; + return is_array($this->byMonthDay) ? $this->byMonthDay : []; } public function daysOfYear(): array { - return $this->byYearDay; + return is_array($this->byYearDay) ? $this->byYearDay : []; } public function weeksOfYear(): array { - return $this->byWeekNo; + return is_array($this->byWeekNo) ? $this->byWeekNo : []; } public function monthsOfYear(): array { - return $this->byMonth; + return is_array($this->byMonth) ? $this->byMonth : []; } public function isRelative(): bool { @@ -81,7 +81,7 @@ public function isRelative(): bool { } public function relativePosition(): array { - return $this->bySetPos; + return is_array($this->bySetPos) ? $this->bySetPos : []; } }