WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/16/2016 05:47:41 PM (5 years ago)
Author:
ocean90
Message:

Responsive images: Skip images with a missing $image_meta['file'] value.

Props joemcgill.
See [37002].
Fixes #35480.

File:
1 edited

Legend:

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

    r37002 r37018  
    986986    $image_meta = apply_filters( 'wp_calculate_image_srcset_meta', $image_meta, $size_array, $image_src, $attachment_id );
    987987
    988     if ( empty( $image_meta['sizes'] ) || strlen( $image_meta['file'] ) < 4 ) {
     988    if ( empty( $image_meta['sizes'] ) || ! isset( $image_meta['file'] ) || strlen( $image_meta['file'] ) < 4 ) {
    989989        return false;
    990990    }
Note: See TracChangeset for help on using the changeset viewer.