aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Photo.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/Photo.php b/include/Photo.php
index d5cbb8d24..819f86059 100644
--- a/include/Photo.php
+++ b/include/Photo.php
@@ -622,7 +622,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,