diff options
Diffstat (limited to 'app/frontend/controls/EventList.php')
-rw-r--r-- | app/frontend/controls/EventList.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/frontend/controls/EventList.php b/app/frontend/controls/EventList.php index d40e000..ea6150b 100644 --- a/app/frontend/controls/EventList.php +++ b/app/frontend/controls/EventList.php @@ -2,7 +2,7 @@ class EventList extends UrlBasedCalendarControl { - private function _setDate($key, $date) { + private function _setDate(string $key, string $date) { $datetime = new DateTime($date, new DateTimeZone('UTC')); if (!$datetime) { throw new TInvalidDataValueException( @@ -14,7 +14,7 @@ class EventList extends UrlBasedCalendarControl { } public function setDateFrom($date) { - $this->_setDate('DateFrom', $date); + $this->_setDate('DateFrom', TPropertyValue::ensureString($date)); } public function getDateFrom() { @@ -22,7 +22,7 @@ class EventList extends UrlBasedCalendarControl { } public function setDateTo($date) { - $this->_setDate('DateTo', $date); + $this->_setDate('DateTo', TPropertyValue::ensureString($date)); } public function getDateTo() { |