Skip to content

Commit

Permalink
Merge pull request #47200 from nextcloud/fix/issue-47193
Browse files Browse the repository at this point in the history
fix: test variables before returning
  • Loading branch information
SebastianKrupinski authored Aug 13, 2024
2 parents f93edb1 + f807d68 commit 4e95ec0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions apps/dav/lib/CalDAV/EventReaderRRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,31 +57,31 @@ 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 {
return isset($this->bySetPos);
}

public function relativePosition(): array {
return $this->bySetPos;
return is_array($this->bySetPos) ? $this->bySetPos : [];
}

}

0 comments on commit 4e95ec0

Please sign in to comment.