[wp-trac] [WordPress Trac] #52084: Blogger Importer: Fatal constructor error in PHP8

WordPress Trac noreply at wordpress.org
Thu Oct 13 22:49:17 UTC 2022


#52084: Blogger Importer: Fatal constructor error in PHP8
----------------------------+----------------------------
 Reporter:  iandunn         |       Owner:  (none)
     Type:  defect (bug)    |      Status:  new
 Priority:  high            |   Milestone:  WordPress.org
Component:  Import          |     Version:  5.5
 Severity:  critical        |  Resolution:
 Keywords:  php8 has-patch  |     Focuses:
----------------------------+----------------------------
Changes (by ironprogrammer):

 * keywords:  php8 => php8 has-patch
 * version:   => 5.5


Comment:

 [https://github.com/WordPress/blogger-importer/pull/2 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
 [https://github.com/WordPress/wordpress-
 develop/commit/d12ad5050b9795b2ef39391c6e60dc8b1eb542ec#diff-
 d8203c999641405857f9d5a432d7a748dbcfd199a7c84fa517437a27bd44f0d6
 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`, [https://php.watch/versions/8.0
 /lsp-errors#class 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
 [https://github.com/simplepie/simplepie/blob/1.5/library/SimplePie/Item.php#L212
 corresponding SimplePie v1.5 update] to `get_id($hash = false, $fn =
 'md5')`.

 This is also reported/being tracked in [https://github.com/WordPress
 /blogger-importer/issues/1].

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52084#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list