From 66d239c034312b9f7cd6d2c8ee8f1ea7a3f3aa0e Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 30 Dec 2015 22:25:28 +0000 Subject: [PATCH] Embeds: Change attachment metadata condition to prevent a warning in the embeds template. Fixes #35237. Built from https://develop.svn.wordpress.org/trunk@36123 git-svn-id: http://core.svn.wordpress.org/trunk@36089 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/embed-template.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/embed-template.php b/wp-includes/embed-template.php index df2518f98f..fab8c84221 100644 --- a/wp-includes/embed-template.php +++ b/wp-includes/embed-template.php @@ -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']; diff --git a/wp-includes/version.php b/wp-includes/version.php index 54d0ae66f9..977bab662e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5-alpha-36122'; +$wp_version = '4.5-alpha-36123'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.