[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
Fri Dec 17 03:05:19 UTC 2021
#54637: wp_read_image_metadata() sends `false` instead of `array` for `$iptc` and
`$exif` parameters to `wp_read_image_metadata` filter
---------------------------------+---------------------
Reporter: volodymyrkolesnykov | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.0
Component: Media | Version: 5.8.2
Severity: normal | Resolution:
Keywords: | Focuses:
---------------------------------+---------------------
Changes (by SergeyBiryukov):
* milestone: Awaiting Review => 6.0
Comment:
Hi there, welcome back to WordPress Trac! Thanks for the ticket.
Replying to [ticket:54637 volodymyrkolesnykov]:
> I see two possible ways to fix this:
> 1. Ensure that `$iptc` and `$exif` are arrays — check the return value
of the parsing functions, or
> 2. Update the documentation/PHP doc blocks to mention that those
parameters can be `false`.
>
> I can submit a patch for this issue, just not sure which of the
solutions is preferred.
I think I'd prefer the first option here, seems in line with a similar fix
for `wp_generate_attachment_metadata()` in [51162] / #52603 (more details
in comment:2:ticket:52603).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54637#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list