diff --git a/wp-includes/media.php b/wp-includes/media.php index dc49414629..9afb105268 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -1203,7 +1203,7 @@ function wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attac $sources = apply_filters( 'wp_calculate_image_srcset', $sources, $size_array, $image_src, $image_meta, $attachment_id ); // Only return a 'srcset' value if there is more than one source. - if ( ! $src_matched || count( $sources ) < 2 ) { + if ( ! $src_matched || ! is_array( $sources ) || count( $sources ) < 2 ) { return false; } diff --git a/wp-includes/version.php b/wp-includes/version.php index ba89354af0..6fb87f2244 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9.5-alpha-42668'; +$wp_version = '4.9.5-alpha-42669'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.