Closed fmunch closed 1 year ago
For the feed https://www.commitstrip.com/fr/feed/ I get the following error:
[2022-10-16 23:42:01] selfoss.ERROR: error loading feed content for CommitStrip {"exception":"[object] (Exception(code: 0): DateTimeImmutable::__construct(): Failed to parse time string (@) at position 0 (@): Unexpected character at /var/www/selfoss/selfoss-2.19/src/spouts/rss/feed.php:108) [stacktrace] #0 /var/www/selfoss/selfoss-2.19/src/spouts/rss/feed.php(108): DateTimeImmutable->__construct() #1 [internal function]: spouts\^Mss\\feed->getItems() #2 /var/www/selfoss/selfoss-2.19/src/helpers/ContentLoader.php(145): iterator_to_array() #3 /var/www/selfoss/selfoss-2.19/src/helpers/ContentLoader.php(71): helpers\\ContentLoader->fetch() #4 /var/www/selfoss/selfoss-2.19/cliupdate.php(7): helpers\\ContentLoader->update() #5 {main} "}
In feed.php:
$unixDate = $item->get_date('U'); $date = $unixDate !== null ? new \DateTimeImmutable('@' . $unixDate) : new \DateTimeImmutable();
In my case SimplePie's get_date() returns false (probably because the date cannot be parsed). Maybe $unixDate !== null should be relaxed a bit.
get_date()
$unixDate !== null
Thanks for reporting, I have opened a fix upstream: https://github.com/simplepie/simplepie/pull/753
For the feed https://www.commitstrip.com/fr/feed/ I get the following error:
In feed.php:
In my case SimplePie's
get_date()
returns false (probably because the date cannot be parsed). Maybe$unixDate !== null
should be relaxed a bit.