re-enable pathinfo() check and try with getimagesize() if we have not got a result
This commit is contained in:
parent
f1a3b281d4
commit
e0a75f68d5
@ -541,17 +541,16 @@ function guess_image_type($filename, $headers = '') {
|
|||||||
// we aren't using imagick can find it
|
// we aren't using imagick can find it
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
if(is_null($type)) {
|
if(is_null($type)) {
|
||||||
$ext = pathinfo($filename, PATHINFO_EXTENSION);
|
$ext = pathinfo($filename, PATHINFO_EXTENSION);
|
||||||
$ph = photo_factory('');
|
$ph = photo_factory('');
|
||||||
$types = $ph->supportedTypes();
|
$types = $ph->supportedTypes();
|
||||||
$type = "image/jpeg";
|
|
||||||
foreach ($types as $m=>$e){
|
foreach ($types as $m=>$e){
|
||||||
if ($ext==$e) $type = $m;
|
if ($ext==$e) $type = $m;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
if(is_null($type)) {
|
if(is_null($type)) {
|
||||||
$size = getimagesize($filename);
|
$size = getimagesize($filename);
|
||||||
$ph = photo_factory('');
|
$ph = photo_factory('');
|
||||||
|
Reference in New Issue
Block a user