X-Git-Url: https://scripts.mit.edu/gitweb/autoinstallsdev/wordpress.git/blobdiff_plain/bd54ad7dcd1cbf3b37f7822f71ca57b742f00a77..b925718b4bf2dd47a8429f844d0a255ca6e35bd1:/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'];