[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 18:12:35 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:  2.8
 Severity:  normal           |  Resolution:
 Keywords:  needs-patch      |     Focuses:
-----------------------------+------------------------------

Comment (by afragen):

 This is the line.

 https://github.com/WordPress/wordpress-
 develop/blob/2f2dbbf24671f1aa12d013f7929491059055d6bf/src/wp-
 admin/includes/class-wp-upgrader.php#L607

 So perhaps casting to an array?


 {{{
 $source_files = array_keys( (array) $wp_filesystem->dirlist( $source ) );
 }}}

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


More information about the wp-trac mailing list