-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.2.0-alpha2
-
Component/s: None
-
None
-
Environment:PHP 7
The final zend_parse_parameters() calls in these functions (respecting the DateTimeInterface allowance for UTCDateTime) uses the "s" type. This causes PHP 7 to throw a TypeError if a string is not passed.
Since union types are not available, we cannot hint for int|string and need some other way to relax the error and allow integers to be converted to strings.
For context, the constructor argument parsing was last changed in d25e565 for PHPC-726.
- is related to
-
PHPC-790 UTCDateTime constructor should truncate floats
- Closed
-
PHPC-726 Allow cross-platform serialization of Timestamp and UTCDateTime
- Closed
- related to
-
PHPLIB-222 Pass UTCDateTime constructor argument as integer
- Closed
- links to