Make WordPress Core

Ticket #57813: img.patch

File img.patch, 634 bytes (added by donbowman, 17 months ago)

patch to wp-admin/includes/image.php

  • /app/wp-admin/includes/image.php

    old new  
    8989
    9090        $registered_sizes = wp_get_registered_image_subsizes();
    9191        $image_meta       = wp_get_attachment_metadata( $attachment_id );
    9292
    9393        // Meta error?
    94         if ( empty( $image_meta ) ) {
     94        if ( empty( $image_meta ) || !array_key_exists('width', $image_meta) || !array_key_exists('height', $image_meta) ) {
    9595                return $registered_sizes;
    9696        }
    9797
    9898        // Use the originally uploaded image dimensions as full_width and full_height.
    9999        if ( ! empty( $image_meta['original_image'] ) ) {