[wp-trac] [WordPress Trac] #62293: wp_get_missing_image_subsizes() - Warning: Undefined array key "height"
WordPress Trac
noreply at wordpress.org
Thu Oct 24 10:15:39 UTC 2024
#62293: wp_get_missing_image_subsizes() - Warning: Undefined array key "height"
--------------------------+-----------------------------
Reporter: apermo | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version:
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
In certain edge cases it is possible that the keys `width` or `height` can
be null or not set inside of `wp_get_missing_image_subsizes()`.
I got that warning in the sentry installation of my project. While this
was a rare occurrance it did happen.
I propose to add a ternary operator to check and sanitize here like done
at other places.
PR on Github.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62293>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list