Make WordPress Core

Changeset 36147 for branches/4.4


Ignore:
Timestamp:
01/02/2016 03:35:47 AM (9 years ago)
Author:
dd32
Message:

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

Merges [36123] to the 4.4 branch.
Fixes #35237.

Location:
branches/4.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.4

  • branches/4.4/src/wp-includes/embed-template.php

    r35689 r36147  
    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.