[wp-trac] [WordPress Trac] #61114: PHP 8+ Fatal Error in WP_Upgrader due to TypeError in array_keys() Call

WordPress Trac noreply at wordpress.org
Wed May 1 14:27:00 UTC 2024


#61114: PHP 8+ Fatal Error in WP_Upgrader due to TypeError in array_keys() Call
-----------------------------+------------------------------
 Reporter:  verygoode        |       Owner:  (none)
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Upgrade/Install  |     Version:  6.5
 Severity:  major            |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+------------------------------

Comment (by verygoode):

 Error for line 603.


 {{{
 PHP Fatal error:  Uncaught TypeError: array_keys(): Argument #1 ($array)
 must be of type array, false given in /wordpress/core/6.5.2/wp-
 admin/includes/class-wp-upgrader.php:603
 Stack trace:
 #0 /wordpress/core/6.5.2/wp-admin/includes/class-wp-upgrader.php(603):
 array_keys(false)
 #1 /wordpress/core/6.5.2/wp-admin/includes/class-wp-upgrader.php(876):
 WP_Upgrader->install_package(Array)
 #2 /wordpress/core/6.5.2/wp-admin/includes/class-plugin-upgrader.php(380):
 WP_Upgrader->run(Array)
 #3 /wordpress/core/6.5.2/wp-admin/includes/ajax-actions.php(4645):
 Plugin_Upgrader->bulk_upgrade(Array)
 #4 /wordpress/core/6.5.2/wp-includes/class-wp-hook.php(324):
 wp_ajax_update_plugin('')
 #5 /wordpress/core/6.5.2/wp-includes/class-wp-hook.php(348):
 WP_Hook->apply_filters('', Array)
 #6 /wordpress/core/6.5.2/wp-includes/plugin.php(517):
 WP_Hook->do_action(Array)
 #7 /wordpress/core/6.5.2/wp-admin/admin-ajax.php(192):
 do_action('wp_ajax_update-...')
 #8 {main}
   thrown in /wordpress/core/6.5.2/wp-admin/includes/class-wp-upgrader.php
 on line 603
 }}}

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


More information about the wp-trac mailing list