[wp-trac] [WordPress Trac] #64295: PHP 8.5: Incorrect array access in `wp_read_image_metadata`
WordPress Trac
noreply at wordpress.org
Mon Nov 24 19:08:42 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 needs-testing | Focuses: php-
commit | compatibility
-------------------------------------------------+-------------------------
Changes (by johnbillion):
* status: accepted => closed
* resolution: => fixed
Comment:
In [changeset:"61291" 61291]:
{{{
#!CommitTicketReference repository="" revision="61291"
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.
Props swissspidy, adamsilverstein
Fixes #64295
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64295#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list