Make WordPress Core

Changeset 36123


Ignore:
Timestamp:
12/30/2015 10:24:31 PM (9 years ago)
Author:
swissspidy
Message:

Embeds: Change attachment metadata condition to prevent a warning in the embeds template.

Fixes #35237.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/embed-template.php

    r35689 r36123  
    5151
    5252            $meta = wp_get_attachment_metadata( $thumbnail_id );
    53             if ( is_array( $meta ) ) {
     53            if ( ! empty( $meta['sizes'] ) ) {
    5454                foreach ( $meta['sizes'] as $size => $data ) {
    5555                    if ( $data['width'] / $data['height'] > $aspect_ratio ) {
Note: See TracChangeset for help on using the changeset viewer.