diff --git a/wp-includes/theme-compat/embed-content.php b/wp-includes/theme-compat/embed-content.php index c77026bd67..11bef95df8 100644 --- a/wp-includes/theme-compat/embed-content.php +++ b/wp-includes/theme-compat/embed-content.php @@ -39,7 +39,7 @@ $meta = wp_get_attachment_metadata( $thumbnail_id ); if ( ! empty( $meta['sizes'] ) ) { foreach ( $meta['sizes'] as $size => $data ) { - if ( $data['width'] / $data['height'] > $aspect_ratio ) { + if ( $data['height'] > 0 && $data['width'] / $data['height'] > $aspect_ratio ) { $aspect_ratio = $data['width'] / $data['height']; $measurements = array( $data['width'], $data['height'] ); $image_size = $size; diff --git a/wp-includes/version.php b/wp-includes/version.php index c7af8e2993..1c8bcd6f91 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9-beta2-41901'; +$wp_version = '4.9-beta2-41902'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.