aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib
diff options
context:
space:
mode:
authorSebastianKrupinski <krupinskis05@gmail.com>2024-08-13 09:54:38 -0400
committerSebastianKrupinski <krupinskis05@gmail.com>2024-08-13 09:54:38 -0400
commitf807d68511eba6c1fda2e83611bb379aaf78712d (patch)
treed64f169e32123782ecb4ea32ca8dd63b98a4ded0 /apps/dav/lib
parentc525ea0a8098e98e4b4871900918421ae1085688 (diff)
downloadnextcloud-server-f807d68511eba6c1fda2e83611bb379aaf78712d.tar.gz
nextcloud-server-f807d68511eba6c1fda2e83611bb379aaf78712d.zip
fix: test variables before returning
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
Diffstat (limited to 'apps/dav/lib')
-rw-r--r--apps/dav/lib/CalDAV/EventReaderRRule.php12
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 : [];
}
}