Media: Fix exif_imagetype check in wp_get_image_mime
This is a follow up to [39831]. Merges [39850] to the 4.4 branch. Built from https://develop.svn.wordpress.org/branches/4.4@39854 git-svn-id: http://core.svn.wordpress.org/branches/4.4@39791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
47bc8e98bd
commit
af0a3c59d1
|
@ -2271,7 +2271,7 @@ function wp_get_image_mime( $file ) {
|
||||||
* we assume the file could not be validated.
|
* we assume the file could not be validated.
|
||||||
*/
|
*/
|
||||||
try {
|
try {
|
||||||
if ( ! is_callable( 'exif_imagetype' ) ) {
|
if ( is_callable( 'exif_imagetype' ) ) {
|
||||||
$mime = image_type_to_mime_type( exif_imagetype( $file ) );
|
$mime = image_type_to_mime_type( exif_imagetype( $file ) );
|
||||||
} elseif ( function_exists( 'getimagesize' ) ) {
|
} elseif ( function_exists( 'getimagesize' ) ) {
|
||||||
$imagesize = getimagesize( $file );
|
$imagesize = getimagesize( $file );
|
||||||
|
|
Loading…
Reference in New Issue