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

Props joemcgill.
See [37002].
Fixes #35480.
Built from https://develop.svn.wordpress.org/trunk@37018


git-svn-id: http://core.svn.wordpress.org/trunk@36985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2016-03-16 17:48:26 +00:00
parent 819930dfc4
commit 7f4b93e61e
2 changed files with 2 additions and 2 deletions

View File

@ -985,7 +985,7 @@ function wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attac
*/
$image_meta = apply_filters( 'wp_calculate_image_srcset_meta', $image_meta, $size_array, $image_src, $attachment_id );
if ( empty( $image_meta['sizes'] ) || strlen( $image_meta['file'] ) < 4 ) {
if ( empty( $image_meta['sizes'] ) || ! isset( $image_meta['file'] ) || strlen( $image_meta['file'] ) < 4 ) {
return false;
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.5-beta3-37017';
$wp_version = '4.5-beta3-37018';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.