Closed kinglozzer closed 6 years ago
https://github.com/wilr/silverstripe-googlesitemaps/blob/c3fcd84542801331cd29f5705a2b4c15ef688721/src/Extensions/GoogleSitemapExtension.php#L128
This will raise warnings in PHP 7.1 as IntlDateFormatter::format() returns a string. Just needs (int)
IntlDateFormatter::format()
(int)
Edit: now I’m doubting myself http://php.net/manual/en/migration71.other-changes.php. I don’t think this actually should raise a warning, unless format() is returning an empty string, or a string like '12345a': https://3v4l.org/KXW64
format()
'12345a'
Edit 2: this was originally discussed on Slack with @guyvanbael - $created->format('U') was failing to return a numeric value for some reason. I can’t spot any reason why that would happen, but perhaps we should just code defensively here anyway
$created->format('U')
https://github.com/wilr/silverstripe-googlesitemaps/blob/c3fcd84542801331cd29f5705a2b4c15ef688721/src/Extensions/GoogleSitemapExtension.php#L128
This will raise warnings in PHP 7.1 as
IntlDateFormatter::format()
returns a string. Just needs(int)
Edit: now I’m doubting myself http://php.net/manual/en/migration71.other-changes.php. I don’t think this actually should raise a warning, unless
format()
is returning an empty string, or a string like'12345a'
: https://3v4l.org/KXW64Edit 2: this was originally discussed on Slack with @guyvanbael -
$created->format('U')
was failing to return a numeric value for some reason. I can’t spot any reason why that would happen, but perhaps we should just code defensively here anyway