Make WordPress Core

Opened 9 years ago

Closed 8 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:
Priority: normal Milestone:
Component: External Libraries Version: 5.1
Severity: normal Keywords: has-patch
Cc: Focuses:

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)

42684.diff (607 bytes ) - added by aquakitty 9 years ago.

Download all attachments as: .zip

Change History (6)

@aquakitty
9 years ago

#1 follow-up: @dd32
9 years ago

  • Component FeedsExternal Libraries
  • Keywords has-patch added
  • Milestone Awaiting Review5.0

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.

#2 in reply to: ↑ 1 @aquakitty
9 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 @daverobinsonpw
8 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

#4 @pento
8 years ago

  • Milestone 5.05.1

#5 @pento
8 years ago

  • Milestone 5.1
  • Resolutionduplicate
  • Status newclosed

As it's fixed in SimplePie, I'm going to close this issue in favour of the existing issue we have for updating SimplePie, #36669.

Note: See TracTickets for help on using tickets.