Make WordPress Core

Ticket #17736: 17736.patch

File 17736.patch, 638 bytes (added by SergeyBiryukov, 14 years ago)
  • wp-admin/includes/image-edit.php

     
    646646
    647647                if ( $target == 'thumbnail' || $target == 'all' || $target == 'full' ) {
    648648                        $file_url = wp_get_attachment_url($post_id);
    649                         if ( $thumb = $meta['sizes']['thumbnail'] )
     649                        if ( !empty( $meta['sizes']['thumbnail'] ) && $thumb = $meta['sizes']['thumbnail'] )
    650650                                $return->thumbnail = path_join( dirname($file_url), $thumb['file'] );
    651651                        else
    652652                                $return->thumbnail = "$file_url?w=128&h=128";