Ticket #57813: img.patch
File img.patch, 634 bytes (added by , 9 months ago) |
---|
-
/app/wp-admin/includes/image.php
old new 89 89 90 90 $registered_sizes = wp_get_registered_image_subsizes(); 91 91 $image_meta = wp_get_attachment_metadata( $attachment_id ); 92 92 93 93 // Meta error? 94 if ( empty( $image_meta ) ) {94 if ( empty( $image_meta ) || !array_key_exists('width', $image_meta) || !array_key_exists('height', $image_meta) ) { 95 95 return $registered_sizes; 96 96 } 97 97 98 98 // Use the originally uploaded image dimensions as full_width and full_height. 99 99 if ( ! empty( $image_meta['original_image'] ) ) {