Opened 4 years ago
Closed 23 months ago
#52084 closed defect (bug) (reported-upstream)
Blogger Importer: Fatal constructor error in PHP8
Reported by: | iandunn | Owned by: | |
---|---|---|---|
Milestone: | Priority: | high | |
Severity: | critical | Version: | 5.5 |
Component: | Import | Keywords: | php8 has-patch |
Focuses: | Cc: |
Description
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
@
4 years ago
- Component changed from WordPress.org Site to Import
- Milestone changed from Awaiting Review to WordPress.org
#3
@
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'"
#4
@
2 years 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
@
2 years 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).
Background
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
- Updates extended class's
WP_SimplePie_Blog_Item::get_id()
to match the corresponding SimplePie v1.5 update toget_id($hash = false, $fn = 'md5')
.
This is also reported/being tracked in https://github.com/WordPress/blogger-importer/issues/1.
#6
@
23 months ago
- Milestone WordPress.org 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.
Loosely related to #49143 and meta#5550.