X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/e8f61417994be715a90671aa87f1cd70d8ba132a..refs/tags/wordpress-4.5.3:/wp-includes/theme-compat/embed-content.php diff --git a/wp-includes/theme-compat/embed-content.php b/wp-includes/theme-compat/embed-content.php index 05498eb9..fca4f38a 100644 --- a/wp-includes/theme-compat/embed-content.php +++ b/wp-includes/theme-compat/embed-content.php @@ -27,7 +27,7 @@ $image_size = 'full'; // Fallback. $meta = wp_get_attachment_metadata( $thumbnail_id ); - if ( is_array( $meta ) ) { + if ( ! empty( $meta['sizes'] ) ) { foreach ( $meta['sizes'] as $size => $data ) { if ( $data['width'] / $data['height'] > $aspect_ratio ) { $aspect_ratio = $data['width'] / $data['height'];