When SimplePie is unable to parse an item update date, it will return false, breaking the promise in PHPDoc. Since we do not expect it, we would try to treat the non-null value as a an int and try to create a date object from it, which lead to the affected sources failing to update with the following error:
Exception: DateTimeImmutable::__construct(): Failed to parse time string (@) at position 0 (@)
When SimplePie is unable to parse an item update date, it will return
false
, breaking the promise in PHPDoc. Since we do not expect it, we would try to treat the non-null value as a an int and try to create a date object from it, which lead to the affected sources failing to update with the following error:I have created an upstream PR:
https://github.com/simplepie/simplepie/pull/753
But until that is available, let’s work around the issue by also guarding against
false
.Closes: https://github.com/fossar/selfoss/issues/1384