Opened 7 years ago
Closed 6 years ago
#42684 closed defect (bug) (duplicate)
This is driving me crazy. SimplePie bug with simple fix: Warning: A non-numeric value encountered in \wordpress\wp-includes\SimplePie\Parse\Date.php on line 694
Reported by: | aquakitty | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.1 |
Component: | External Libraries | Keywords: | has-patch |
Focuses: | Cc: |
Description
It was my understanding SimplePie has/is being updated, but this bug persists in WP 5.0. It is such a simple fix, why hasn't this been added? I use a feed on many websites that has a non-numeric value in the date, and every time I update I have to manually fix this issue.
Here is an example of an RSS feed that would cause the issue:
http://www.mortgagebrokernews.ca/rss/
The "T" in the timestamp
<updated>2017-11-23T09:20:00-05:00</updated>
<?php $second = round($match[6] + $match[7] / pow(10, strlen($match[7])));
Fix:
<?php $second = round((int)$match[6] + (int)$match[7] / pow(10, strlen($match[7])));
Attachments (1)
Change History (6)
#1
follow-up:
↓ 2
@
7 years ago
- Component changed from Feeds to External Libraries
- Keywords has-patch added
- Milestone changed from Awaiting Review to 5.0
#2
in reply to:
↑ 1
@
7 years ago
Replying to dd32:
Hi @aquakitty,
As SimplePie is an external library, we generally don't modify them directly.
SimplePie has a ticket open for this which I ran into just the other day: https://github.com/simplepie/simplepie/issues/534
However, due to the simple nature of the change, we'll probably just roll with this specific fix if isn't fixed upstream anytime soon.
Great. Thank you.
#3
@
6 years ago
This had already been fixed in SimplePie, however the version included in Wordpress is 1.3.1 from 2012 so it's missing a lot of updates. Current version is 1.5.1
This particular issue was fixed in 1.4.3 you can see it in the following pull request https://github.com/simplepie/simplepie/pull/458
Hi @aquakitty,
As SimplePie is an external library, we generally don't modify them directly.
SimplePie has a ticket open for this which I ran into just the other day: https://github.com/simplepie/simplepie/issues/534
However, due to the simple nature of the change, we'll probably just roll with this specific fix if isn't fixed upstream anytime soon.