aboutsummaryrefslogtreecommitdiffstats
path: root/include/photo/photo_imagick.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-04-29 19:52:31 -0700
committerfriendica <info@friendica.com>2013-04-29 19:52:31 -0700
commitd63de4dbe2bec1341122dc85de5430c81bcef46f (patch)
tree05b03e096fc87c0b99131e5b11043eb2e0800a14 /include/photo/photo_imagick.php
parent641e69ef7f3d82a1ebf2047b80d282d5c0c87af9 (diff)
downloadvolse-hubzilla-d63de4dbe2bec1341122dc85de5430c81bcef46f.tar.gz
volse-hubzilla-d63de4dbe2bec1341122dc85de5430c81bcef46f.tar.bz2
volse-hubzilla-d63de4dbe2bec1341122dc85de5430c81bcef46f.zip
don't try and load an empty string as a photo
Diffstat (limited to 'include/photo/photo_imagick.php')
-rw-r--r--include/photo/photo_imagick.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/photo/photo_imagick.php b/include/photo/photo_imagick.php
index 7282898b4..2737c8f69 100644
--- a/include/photo/photo_imagick.php
+++ b/include/photo/photo_imagick.php
@@ -27,6 +27,10 @@ class photo_imagick extends photo_driver {
function load($data, $type) {
$this->valid = false;
$this->image = new Imagick();
+
+ if(! $data)
+ return;
+
$this->image->readImageBlob($data);
@@ -71,9 +75,9 @@ class photo_imagick extends photo_driver {
if((! $quality) || ($quality > 100))
$quality = JPEG_QUALITY;
$this->image->setCompressionQuality($quality);
-
default:
break;
+
}
}
}