aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-10-28 21:52:56 +0100
committerMario Vavti <mario@mariovavti.com>2015-10-28 21:52:56 +0100
commite0a75f68d58d3c0074100ad342ecb889b88840dd (patch)
tree65ae095295dc93ae2fd978eca40341d6c81d217a /include
parentf1a3b281d4573e12f7a81efa03fb1db73ba34e27 (diff)
downloadvolse-hubzilla-e0a75f68d58d3c0074100ad342ecb889b88840dd.tar.gz
volse-hubzilla-e0a75f68d58d3c0074100ad342ecb889b88840dd.tar.bz2
volse-hubzilla-e0a75f68d58d3c0074100ad342ecb889b88840dd.zip
re-enable pathinfo() check and try with getimagesize() if we have not got a result
Diffstat (limited to 'include')
-rw-r--r--include/photo/photo_driver.php5
1 files 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('');