WordPress.org

Make WordPress Core

Ticket #7242: 7242.diff

File 7242.diff, 601 bytes (added by DD32, 6 years ago)
  • wp-includes/media.php

     
    7373        } 
    7474        elseif ( $size == 'thumbnail' ) { 
    7575                // fall back to the old thumbnail 
    76                 if ( $thumb_file = wp_get_attachment_thumb_file() && $info = getimagesize($thumb_file) ) { 
     76                if ( ($thumb_file = wp_get_attachment_thumb_file($id)) && $info = getimagesize($thumb_file) ) { 
    7777                        $img_url = str_replace(basename($img_url), basename($thumb_file), $img_url); 
    7878                        $width = $info[0]; 
    7979                        $height = $info[1];