[wp-trac] [WordPress Trac] #50367: Avoid layout shifting due to images not having dimension attributes
WordPress Trac
noreply at wordpress.org
Thu Jul 2 18:20:26 UTC 2020
#50367: Avoid layout shifting due to images not having dimension attributes
-------------------------------------------------+-------------------------
Reporter: flixos90 | Owner: flixos90
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 5.5
Component: Media | Version:
Severity: normal | Resolution: fixed
Keywords: needs-testing has-patch has-unit- | Focuses:
tests needs-dev-note |
-------------------------------------------------+-------------------------
Comment (by Otto42):
We're starting to see a lot of warnings and errors that are possibly
related to this change on wordpress.org.
Warning: Invalid argument supplied for foreach() in /wp-includes/media.php
on line 1520
Warning: Illegal string offset 'file' in /wp-includes/media.php on line
1513
Warning: Illegal string offset 'sizes' in /wp-includes/media.php on line
1520
This is happening pretty much anywhere we have an image. Might need some
sanity checks around this for cases where the image is not an attachment
in the media library.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50367#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list