Page MenuHomePhabricator

D16785.id40425.diff
No OneTemporary

D16785.id40425.diff

diff --git a/src/parser/calendar/data/PhutilCalendarAbsoluteDateTime.php b/src/parser/calendar/data/PhutilCalendarAbsoluteDateTime.php
--- a/src/parser/calendar/data/PhutilCalendarAbsoluteDateTime.php
+++ b/src/parser/calendar/data/PhutilCalendarAbsoluteDateTime.php
@@ -125,7 +125,7 @@
->setMinute(idx($dict, 'minute', 0))
->setSecond(idx($dict, 'second', 0))
->setTimezone(idx($dict, 'timezone'))
- ->setIsAllDay(idx($dict, 'isAllDay', false));
+ ->setIsAllDay((bool)idx($dict, 'isAllDay', false));
return $datetime;
}
@@ -150,14 +150,14 @@
public function toDictionary() {
return array(
'kind' => 'absolute',
- 'year' => $this->getYear(),
- 'month' => $this->getMonth(),
- 'day' => $this->getDay(),
- 'hour' => $this->getHour(),
- 'minute' => $this->getMinute(),
- 'second' => $this->getSecond(),
+ 'year' => (int)$this->getYear(),
+ 'month' => (int)$this->getMonth(),
+ 'day' => (int)$this->getDay(),
+ 'hour' => (int)$this->getHour(),
+ 'minute' => (int)$this->getMinute(),
+ 'second' => (int)$this->getSecond(),
'timezone' => $this->getTimezone(),
- 'isAllDay' => $this->getIsAllDay(),
+ 'isAllDay' => (bool)$this->getIsAllDay(),
);
}

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 21, 11:04 PM (26 m, 48 s)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6772720
Default Alt Text
D16785.id40425.diff (1 KB)

Event Timeline