diff --git wp-admin/includes/image.php wp-admin/includes/image.php
index 07c4f8e..1aa072e 100644
|
|
|
function file_is_valid_image($path) { |
| 372 | 372 | * @return bool True if suitable, false if not suitable. |
| 373 | 373 | */ |
| 374 | 374 | function file_is_displayable_image($path) { |
| 375 | | $info = @getimagesize($path); |
| 376 | | if ( empty($info) ) |
| | 375 | $image_type = @exif_imagetype( $path ); |
| | 376 | if ( empty($image_type) ) |
| 377 | 377 | $result = false; |
| 378 | | elseif ( !in_array($info[2], array(IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG)) ) // only gif, jpeg and png images can reliably be displayed |
| | 378 | elseif ( !in_array($image_type, array(IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG)) ) // only gif, jpeg and png images can reliably be displayed |
| 379 | 379 | $result = false; |
| 380 | 380 | else |
| 381 | 381 | $result = true; |