WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #50384


Ignore:
Timestamp:
06/13/2020 11:48:10 AM (6 months ago)
Author:
SergeyBiryukov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #50384

    • Property Component changed from General to Media
  • Ticket #50384 – Description

    initial v1  
    11Hello,
    22
    3 Stumbled upon a bug at @getimagesize, which causes image generation to fail.
     3Stumbled upon a bug at `@getimagesize`, which causes image generation to fail.
    44
    55To replicate:
     
    1212
    1313Further checking, wp_create_image_subsizes is called, where
    14 
     14{{{
    1515        $imagesize = @getimagesize( $file );
    16 
     16}}}
    1717will try to get the image size, which it returns empty.
    18 
     18{{{
    1919if ( empty( $imagesize ) ) {
    2020
     
    2222           return array();
    2323        }
    24 
     24}}}
    2525will return empty array, hence wp_generate_attachment_metadata will save empty metadata, hence any file generation will be cancelled.
    2626
    2727
    28 Manually setting imagesize where @getimagesize fails, can confirm metadata generates fine and all file regenarations work.
    29 
     28Manually setting imagesize where `@getimagesize` fails, can confirm metadata generates fine and all file regenarations work.
     29{{{
    3030if ( empty( $imagesize ) ) {
    3131
     
    3636//              return array();
    3737        }
     38}}}
    3839
    39 
    40 @getimagesize fails for some files.
     40`@getimagesize` fails for some files.
    4141
    4242Regards,