mirror of
https://github.com/nextcloud/server.git
synced 2026-04-22 23:03:00 -04:00
fix: test variables before returning
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
This commit is contained in:
parent
c525ea0a80
commit
f807d68511
1 changed files with 6 additions and 6 deletions
|
|
@ -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 : [];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue