Make WordPress Core

Opened 3 years ago

Closed 17 months ago

#52084 closed defect (bug) (reported-upstream)

Blogger Importer: Fatal constructor error in PHP8

Reported by: iandunn's profile iandunn Owned by:
Milestone: Priority: high
Severity: critical Version: 5.5
Component: Import Keywords: php8 has-patch
Focuses: Cc:


Fatal error: Declaration of WP_SimplePie_Blog_Item::get_id($hash = false) must be compatible with SimplePie_Item::get_id($hash = false, $fn = 'md5') in plugins/blogger-importer/blogger-importer-blogitem.php on line 111

Change History (6)

#1 @SergeyBiryukov
3 years ago

  • Component changed from Site to Import
  • Milestone changed from Awaiting Review to

#2 @jrf
3 years ago

Loosely related to #49143 and meta#5550.

#3 @shehzaday123
2 years ago

open xampp\htdocs\yourprojectfolder\wp-content\plugins\blogger-importer and open blogger-importer-blogitem. edit with notepad and replace line 111 with following
"$hash = false, $fn = 'md5'"
No image "\Users\Aly\Desktop\Screenshot_2" attached to C

#4 @Dhashika
22 months ago

Thank you so very much for this!!!! I spent the day trying to figure this out. So glad I came across your thread!!!!

#5 @ironprogrammer
18 months ago

  • Keywords has-patch added
  • Version set to 5.5

PR #2 in the Blogger Importer project has been created to address this issue (the PR isn't in the WordPress mirror, so doesn't show up in #section-pr on this page).


SimplePie was updated to v1.5.5 in [47733] (commit d12ad50), where the method signature for SimplePie_Item::get_id() was changed. The reported error is caused by a non-matching signature in the extended class WP_SimplePie_Blog_Item, violating LSP, which in PHP 8 is fatal. Prior to PHP 8, this would only have issued a warning.

In the PR

This is also reported/being tracked in

#6 @ironprogrammer
17 months ago

  • Milestone deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed

This issue has been addressed in PR #2 and committed upstream.

In 8c7fef2:

  • Update signature for get_id method.

Props iandunn, dd32, jrf, shehzaday123, zaerl, ironprogrammer.

Note: See TracTickets for help on using tickets.