[wp-trac] [WordPress Trac] #61997: Undefined array key "height" and "width" in wp-includes/media.php on line 1241 and 1242
WordPress Trac
noreply at wordpress.org
Mon Sep 9 15:06:14 UTC 2024
#61997: Undefined array key "height" and "width" in wp-includes/media.php on line
1241 and 1242
----------------------------+------------------------------
Reporter: internationils | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 4.0
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
----------------------------+------------------------------
Changes (by hellofromTonya):
* version: 6.6.1 => 4.0
Old description:
> I am getting lots of these errors in my logs:
> 2024-09-01_03:38:54_PHP Warning: Undefined array key "height" in
> /srv/data/web/vhosts/MYSITE.COM/htdocs/wp-includes/media.php on line 1242
> 2024-09-01_03:38:54_PHP Warning: Undefined array key "width" in
> /srv/data/web/vhosts/MYSITE.COM/htdocs/wp-includes/media.php on line 1241
>
> They are coming from the code below... any chance of catching the error
> and hinting at where it is coming from (what file, possibly an SVG or
> something with dimensions not specified?) As is, its pretty hard to
> figure out whats causing it and if its a real problem or an annoyance.
>
> https://github.com/WordPress/wordpress-
> develop/blob/8e89a9856e3d8369225df0c63cb6911ec884ab4f/src/wp-
> includes/media.php#L1241
New description:
I am getting lots of these errors in my logs:
{{{
2024-09-01_03:38:54_PHP Warning: Undefined array key "height" in
/srv/data/web/vhosts/MYSITE.COM/htdocs/wp-includes/media.php on line 1242
2024-09-01_03:38:54_PHP Warning: Undefined array key "width" in
/srv/data/web/vhosts/MYSITE.COM/htdocs/wp-includes/media.php on line 1241
}}}
They are coming from the code below... any chance of catching the error
and hinting at where it is coming from (what file, possibly an SVG or
something with dimensions not specified?) As is, its pretty hard to figure
out whats causing it and if its a real problem or an annoyance.
https://github.com/WordPress/wordpress-
develop/blob/8e89a9856e3d8369225df0c63cb6911ec884ab4f/src/wp-
includes/media.php#L1241
--
Comment:
I'm doing triage for 6.6.x cycle. No changes were made in this function or
its usage in 6.6.1. In searching for usages of
`_wp_get_image_size_from_meta()`, it was introduced in WP 4.4.0 via
[35412]. Updating the `Version` that introduced this code to `4.4.0`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61997#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list