[wp-trac] [WordPress Trac] #42684: 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

WordPress Trac noreply at wordpress.org
Thu Nov 23 20:31:59 UTC 2017


#42684: 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
--------------------------+-----------------------------
 Reporter:  aquakitty     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Feeds         |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 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
 <?php
 $second = round($match[6] + $match[7] / pow(10, strlen($match[7])));

 }}}

 Fix:

 {{{#!php
 <?php
 $second = round((int)$match[6] + (int)$match[7] / pow(10,
 strlen($match[7])));

 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42684>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list