Media: Fix exif_imagetype check in wp_get_image_mime
This is a follow up to [39831]. Merges [39850] to the 3.7 branch. git-svn-id: https://develop.svn.wordpress.org/branches/3.7@39861 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4990532160
commit
dfdefb1ded
@ -1969,7 +1969,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
Block a user