[wp-trac] [WordPress Trac] #54637: wp_read_image_metadata() sends `false` instead of `array` for `$iptc` and `$exif` parameters to `wp_read_image_metadata` filter

WordPress Trac noreply at wordpress.org
Thu Apr 28 10:59:06 UTC 2022


#54637: wp_read_image_metadata() sends `false` instead of `array` for `$iptc` and
`$exif` parameters to `wp_read_image_metadata` filter
-------------------------------------+---------------------------
 Reporter:  volodymyrkolesnykov      |       Owner:  mikeschroder
     Type:  defect (bug)             |      Status:  closed
 Priority:  normal                   |   Milestone:  6.0
Component:  Media                    |     Version:  5.8.2
 Severity:  normal                   |  Resolution:  fixed
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+---------------------------
Changes (by mikeschroder):

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


Comment:

 In [changeset:"53303" 53303]:
 {{{
 #!CommitTicketReference repository="" revision="53303"
 Media: Ensure `wp_read_image_metadata` filter returns array for `$iptc`
 and `$exif`.

 Makes the behavior of the filter lines up with its documentation.
 Previously, both `$iptc` and `$exif` could return `false` when
 `exif_read_data()` or `iptcparse()` failed.

 Now, if those functions do not return an array, the results are explicitly
 set to `array()`.

 Props volodymyrkolesnykov, SergeyBiryukov, sabernhardt, sumitsingh,
 mikeschroder.
 Fixes #54637.
 }}}

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


More information about the wp-trac mailing list