[wp-trac] [WordPress Trac] #56431: Fatal Error on Update Page When a Plugin's Icon is Not Set

WordPress Trac noreply at wordpress.org
Wed Aug 24 17:59:41 UTC 2022


#56431: Fatal Error on Update Page When a Plugin's Icon is Not Set
---------------------------------------+------------------------------
 Reporter:  scott.deluzio              |       Owner:  (none)
     Type:  defect (bug)               |      Status:  new
 Priority:  normal                     |   Milestone:  Awaiting Review
Component:  Upgrade/Install            |     Version:  6.0.1
 Severity:  normal                     |  Resolution:
 Keywords:  needs-patch needs-testing  |     Focuses:
---------------------------------------+------------------------------
Changes (by scott.deluzio):

 * keywords:  needs-patch needs-testing reporter-feedback => needs-patch
     needs-testing


Comment:

 I first noticed it when we updated our servers to PHP 8. I never noticed
 it before that update, so it may be an issue with how PHP 8 handles this.

 Looking in the code for `update-core.php` the `if ( ! empty(
 $plugin_data->update->icons[ $preferred_icon ] ) ) {` code seems to exist
 at least as far back as 5.0 (probably further back, but I didn't look any
 further), which was long before we started using PHP 8. I would suspect
 that a similar error would have occurred had the server been using PHP 8
 at the time. Then again, it could just be a coincidence that this error
 started showing up around the time that PHP 8 was introduced.

 I, unfortunately, don't have a test environment set up at the moment to
 test this theory, but I'm hoping it will point to the solution.

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


More information about the wp-trac mailing list