]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/embed-template.php
WordPress 4.4.1
[autoinstalls/wordpress.git] / wp-includes / embed-template.php
index df2518f98fc5480b492afd5c4ef2333ed27d8a61..fab8c84221926c0489aeaa55fbad9b85ca3866d9 100644 (file)
@@ -50,7 +50,7 @@ if ( have_posts() ) :
                        $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'];