[wp-trac] [WordPress Trac] #64295: PHP 8.5: Incorrect array access in `wp_read_image_metadata`

WordPress Trac noreply at wordpress.org
Tue Nov 25 14:06:34 UTC 2025


#64295: PHP 8.5: Incorrect array access in `wp_read_image_metadata`
-------------------------------------------------+-------------------------
 Reporter:  swissspidy                           |       Owner:
                                                 |  johnbillion
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  6.9
Component:  Media                                |     Version:
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch php85 commit dev-reviewed  |     Focuses:  php-
                                                 |  compatibility
-------------------------------------------------+-------------------------
Changes (by johnbillion):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"61305" 61305]:
 {{{
 #!CommitTicketReference repository="" revision="61305"
 Media: Account for boolean false being returned by `wp_getimagesize()`
 when dealing with potentially invalid images in
 `wp_read_image_metadata()`.

 Prior to PHP 8.5 a boolean value was silently ignored when being passed to
 list(), but in PHP 8.5 and higher this now triggers a PHP warning. This
 change adds an appropriate guard condition.

 Merges [61291] into the 6.9 branch.

 Props swissspidy, adamsilverstein

 Fixes #64295
 }}}

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


More information about the wp-trac mailing list