Make WordPress Core

Changeset 46772


Ignore:
Timestamp:
11/25/2019 10:05:39 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Media: Avoid a PHP notice in image_downsize() when trying to replace a non-image URL with a rendered image from its meta.

Props Mte90, jrf, hareesh-pillai.
Fixes #48324.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media.php

    r46660 r46772  
    221221    // Otherwise, a non-image type could be returned.
    222222    if ( ! $is_image ) {
    223         if ( ! empty( $meta['sizes'] ) ) {
     223        if ( ! empty( $meta['sizes']['full'] ) ) {
    224224            $img_url          = str_replace( $img_url_basename, $meta['sizes']['full']['file'], $img_url );
    225225            $img_url_basename = $meta['sizes']['full']['file'];
Note: See TracChangeset for help on using the changeset viewer.