]> git.mxchange.org Git - friendica.git/commitdiff
imagick exception
authorfriendica <info@friendica.com>
Wed, 17 Oct 2012 22:22:29 +0000 (15:22 -0700)
committerfriendica <info@friendica.com>
Wed, 17 Oct 2012 22:22:29 +0000 (15:22 -0700)
include/Photo.php

index ec967ac7498f3edc0d6bc5997f2e55850a1caf59..8fd581977decbb2201415f1ee6a666c325f4acba 100644 (file)
@@ -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,