diff options
author | Sebastian Krupinski <165827823+SebastianKrupinski@users.noreply.github.com> | 2024-08-13 13:25:14 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-13 13:25:14 -0400 |
commit | 4e95ec033dd8ff53794bd7afa11884eddcad64f8 (patch) | |
tree | 41dc089c08179bc6f09343aa34cafcea47477414 /apps/dav/lib | |
parent | f93edb17747028462b32a7f831b458e652a3698a (diff) | |
parent | f807d68511eba6c1fda2e83611bb379aaf78712d (diff) | |
download | nextcloud-server-4e95ec033dd8ff53794bd7afa11884eddcad64f8.tar.gz nextcloud-server-4e95ec033dd8ff53794bd7afa11884eddcad64f8.zip |
Merge pull request #47200 from nextcloud/fix/issue-47193
fix: test variables before returning
Diffstat (limited to 'apps/dav/lib')
-rw-r--r-- | apps/dav/lib/CalDAV/EventReaderRRule.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/dav/lib/CalDAV/EventReaderRRule.php b/apps/dav/lib/CalDAV/EventReaderRRule.php index 965abb4c9cd..fa47930caa8 100644 --- a/apps/dav/lib/CalDAV/EventReaderRRule.php +++ b/apps/dav/lib/CalDAV/EventReaderRRule.php @@ -57,23 +57,23 @@ class EventReaderRRule extends \Sabre\VObject\Recur\RRuleIterator { } 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 @@ class EventReaderRRule extends \Sabre\VObject\Recur\RRuleIterator { } public function relativePosition(): array { - return $this->bySetPos; + return is_array($this->bySetPos) ? $this->bySetPos : []; } } |