[wp-trac] [WordPress Trac] #57813: wp_get_missing_image_subsizes() can give error if image_meta exists, but not height/width
WordPress Trac
noreply at wordpress.org
Fri Oct 25 07:22:09 UTC 2024
#57813: wp_get_missing_image_subsizes() can give error if image_meta exists, but
not height/width
--------------------------+------------------------------
Reporter: donbowman | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 6.1.1
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+------------------------------
Comment (by apermo):
Replying to [comment:2 donbowman]:
> This is another spot with the same issue, assuming width/height exist on
svg. This is on 6.3.2
>
> {{{
> --- /app/wp-includes/media.php.orig 2023-10-28 15:19:04.671902110
+0000
> +++ /app/wp-includes/media.php 2023-10-28 15:19:35.784547473
+0000
> @@ -1642,6 +1642,8 @@
> // Is it a full size image?
> if (
> isset( $image_meta['file'] ) &&
> + array_key_exists('width', $image_meta['file'] &&
> + array_key_exists('height', $image_meta['file'] &&
> str_contains( $image_src, wp_basename( $image_meta['file']
) )
> ) {
> $dimensions = array(
> }}}
While this is definitely a related problem, I'm unsure wether this
shouldn't be a seperate trac issue, to ease the discussion. The initial
problem is a backend issue. This is a frontend issue. To reduce complexity
I would suggest to split this part up into a second issue and a distinct
PR if everyone agrees.
CC @Soean @donbowman @sabernhardt
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57813#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list