Wordpress 4.5.3
[autoinstalls/wordpress.git] / wp-includes / theme-compat / embed-content.php
index 05498eb9031a02671e1e5e0e8f96055f27796319..fca4f38a621663e3594f55de579d97fcc09b19be 100644 (file)
@@ -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'];