Changes between Initial Version and Version 1 of Ticket #50384
- Timestamp:
- 06/13/2020 11:48:10 AM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #50384
-
Property
Component
changed from
General
toMedia
-
Property
Component
changed from
-
Ticket #50384 – Description
initial v1 1 1 Hello, 2 2 3 Stumbled upon a bug at @getimagesize, which causes image generation to fail.3 Stumbled upon a bug at `@getimagesize`, which causes image generation to fail. 4 4 5 5 To replicate: … … 12 12 13 13 Further checking, wp_create_image_subsizes is called, where 14 14 {{{ 15 15 $imagesize = @getimagesize( $file ); 16 16 }}} 17 17 will try to get the image size, which it returns empty. 18 18 {{{ 19 19 if ( empty( $imagesize ) ) { 20 20 … … 22 22 return array(); 23 23 } 24 24 }}} 25 25 will return empty array, hence wp_generate_attachment_metadata will save empty metadata, hence any file generation will be cancelled. 26 26 27 27 28 Manually setting imagesize where @getimagesizefails, can confirm metadata generates fine and all file regenarations work.29 28 Manually setting imagesize where `@getimagesize` fails, can confirm metadata generates fine and all file regenarations work. 29 {{{ 30 30 if ( empty( $imagesize ) ) { 31 31 … … 36 36 // return array(); 37 37 } 38 }}} 38 39 39 40 @getimagesize fails for some files. 40 `@getimagesize` fails for some files. 41 41 42 42 Regards,