From f6f3042d00f7210022c73c721421ec7becbfa8e1 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 17 Oct 2012 15:22:29 -0700 Subject: [PATCH] imagick exception --- include/Photo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/Photo.php b/include/Photo.php index ec967ac749..8fd581977d 100644 --- a/include/Photo.php +++ b/include/Photo.php @@ -665,7 +665,7 @@ function guess_image_type($filename, $fromcurl=false) { } if (is_null($type)){ // Guessing from extension? Isn't that... dangerous? - if(class_exists('Imagick')) { + if(class_exists('Imagick') && file_exists($filename) && is_readable($filename)) { /** * Well, this not much better, * but at least it comes from the data inside the image, -- 2.39.5