WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 8 months ago

#42515 closed defect (bug) (duplicate)

PHP 7.1 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: needs-patch
Focuses: Cc:
PR Number:

Description

When using the function get_permalink() for the RSS feed, I am getting this error.

I fixed it by casting match[] for now.

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

Change History (6)

#1 in reply to: ↑ description @aquakitty
2 years ago

Modified line:

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

#2 @ocean90
2 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release
  • Version 4.8.3 deleted

Hello @aquakitty, welcome to WordPress Trac!

Thanks for your report. SimplePie is a third-party library and core isn't using the latest one (see #36669). The warning has already been fixed in https://github.com/simplepie/simplepie/commit/1111dab1baced14aaf05509c41ee416c3fc6a961.

#3 @aquakitty
2 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #36669.

Great, thank you I tried finding this but I guess I need some work on my search skills.

#4 @johnbillion
2 years ago

  • Milestone Future Release deleted

#5 @julianathebanana
8 months ago

  • Resolution duplicate deleted
  • Status changed from closed to reopened
  • Version set to 5.1

This problem is STILL there in Wordpress 5.1.1

I manually edited the line, but upon last automatic update the line reverted back to what it was.

Server: Ubuntu 18.04
PHP: 7.2
Nginx: 1.14.0

nginx server log is full of :
PHP message: PHP Warning: A non-numeric value encountered in /var/www/idyl.io/html/wp-includes/SimplePie/Parse/Date.php on line 694

Last edited 8 months ago by julianathebanana (previous) (diff)

#6 @knutsp
8 months ago

  • Resolution set to duplicate
  • Status changed from reopened to closed

This ticket was closed as a duplicate of #36669. No reason was given indication this is not still a duplicate, so closing.

Note: See TracTickets for help on using tickets.