WordPress.org

Make WordPress Core

Ticket #40017: exif.diff

File exif.diff, 643 bytes (added by blobfolio, 3 years ago)

Implements fix.

  • src/wp-includes/functions.php

     
    23672367         */
    23682368        try {
    23692369                if ( is_callable( 'exif_imagetype' ) ) {
    2370                         $mime = image_type_to_mime_type( exif_imagetype( $file ) );
     2370                        $imagetype = exif_imagetype( $file );
     2371                        $mime = ( false !== $imagetype ) ? image_type_to_mime_type( $imagetype ) : false;
    23712372                } elseif ( function_exists( 'getimagesize' ) ) {
    23722373                        $imagesize = getimagesize( $file );
    23732374                        $mime = ( isset( $imagesize['mime'] ) ) ? $imagesize['mime'] : false;