From 9d5129de34b0c7877cbb4b84551e75c0aa95117a Mon Sep 17 00:00:00 2001 From: nostupidzone Date: Tue, 7 Oct 2014 23:59:26 -0700 Subject: put back local file check so body is fetched from z_ functions --- include/photo/photo_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/photo') diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php index c416c0df3..508d82957 100644 --- a/include/photo/photo_driver.php +++ b/include/photo/photo_driver.php @@ -515,7 +515,7 @@ function guess_image_type($filename, $headers = '') { $ignore_imagick = get_config('system', 'ignore_imagick'); // Guessing from extension? Isn't that... dangerous? - if(class_exists('Imagick') && !$ignore_imagick) { + if(class_exists('Imagick') && file_exists($filename) && is_readable($filename) && !$ignore_imagick) { $v = Imagick::getVersion(); preg_match('/ImageMagick ([0-9]+\.[0-9]+\.[0-9]+)/', $v['versionString'], $m); if(version_compare($m[1],'6.6.7') >= 0) { -- cgit v1.2.3