Support » Fixing WordPress » PHP 7 Non-numeric value in SimplePie Date

  • Hello,
    I’m getting the following error occasionally in my error logs:

    “PHP Warning: A non-numeric value encountered in /var/www/html/SITE/wp-includes/SimplePie/Parse/Date.php on line 694”

    I know that this is a new error in PHP 7. I am able to fix it by either casting or using the parseInt() function, however I believe this ought to be fixed in the source.

    The source is here: https://github.com/WordPress/WordPress/blob/master/wp-includes/SimplePie/Parse/Date.php#L694, and looks like this: $second = round($match[6] + $match[7] / pow(10, strlen($match[7])));

    • This topic was modified 3 years, 5 months ago by mikedombo.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘PHP 7 Non-numeric value in SimplePie Date’ is closed to new replies.