From e0a75f68d58d3c0074100ad342ecb889b88840dd Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 28 Oct 2015 21:52:56 +0100 Subject: [PATCH] re-enable pathinfo() check and try with getimagesize() if we have not got a result --- include/photo/photo_driver.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php index db98f7085..bbcc110c8 100644 --- a/include/photo/photo_driver.php +++ b/include/photo/photo_driver.php @@ -541,17 +541,16 @@ function guess_image_type($filename, $headers = '') { // we aren't using imagick can find it } } -/* + if(is_null($type)) { $ext = pathinfo($filename, PATHINFO_EXTENSION); $ph = photo_factory(''); $types = $ph->supportedTypes(); - $type = "image/jpeg"; foreach ($types as $m=>$e){ if ($ext==$e) $type = $m; } } -*/ + if(is_null($type)) { $size = getimagesize($filename); $ph = photo_factory('');