[wp-trac] [WordPress Trac] #57239: Notice undefined array keys width and height when using full svg image

WordPress Trac noreply at wordpress.org
Tue Sep 17 06:03:23 UTC 2024


#57239: Notice undefined array keys width and height when using full svg image
---------------------------------------------+-----------------------------
 Reporter:  joeyjanson                       |       Owner:  (none)
     Type:  defect (bug)                     |      Status:  new
 Priority:  normal                           |   Milestone:  Awaiting
                                             |  Review
Component:  Media                            |     Version:  6.1.1
 Severity:  normal                           |  Resolution:
 Keywords:  has-patch needs-design-feedback  |     Focuses:
---------------------------------------------+-----------------------------
Changes (by internationils):

 * keywords:  has-patch => has-patch needs-design-feedback


Comment:

 Currently on different lines:

 {{{
 2024-09-16_01:07:11_PHP Warning:  Undefined array key "height" in
 /srv/data/web/vhosts/MYSITE.COM/htdocs/wp-includes/media.php on line 1242
 2024-09-16_01:07:11_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

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


More information about the wp-trac mailing list