WordPress.org

Make WordPress Core

Opened 14 months ago

Closed 14 months ago

Last modified 14 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:
Component: External Libraries Keywords: needs-patch
Focuses: Cc:

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 (4)

#1 in reply to: ↑ description @aquakitty
14 months ago

Modified line:

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

#2 @ocean90
14 months 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
14 months 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
14 months ago

  • Milestone Future Release deleted
Note: See TracTickets for help on using tickets.