Page MenuHomePhabricator

D16785.id40427.diff
No OneTemporary

D16785.id40427.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
Mon, May 20, 5:07 PM (1 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6276868
Default Alt Text
D16785.id40427.diff (1 KB)

Event Timeline