WordPress.org

Make WordPress Core

Ticket #34437: 34437.diff

File 34437.diff, 577 bytes (added by joemcgill, 4 years ago)
  • src/wp-includes/media.php

    diff --git src/wp-includes/media.php src/wp-includes/media.php
    index f6c5f0f..e7dca8d 100644
    function wp_prepare_attachment_for_js( $attachment ) { 
    31433143
    31443144                        /** This filter is documented in wp-includes/media.php */
    31453145                        if ( $downsize = apply_filters( 'image_downsize', false, $attachment->ID, $size ) ) {
    3146                                 if ( ! $downsize[3] )
     3146                                if ( empty( $downsize[3] ) ) {
    31473147                                        continue;
     3148                                }
     3149
    31483150                                $sizes[ $size ] = array(
    31493151                                        'height'      => $downsize[2],
    31503152                                        'width'       => $downsize[1],