Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14073136
D16785.id40425.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D16785.id40425.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D16785: Add some stricter casts to PhutilCalendarAbsoluteDateTime serialization
Attached
Detach File
Event Timeline
Log In to Comment