aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-12-03 10:45:43 +0100
committerMario Vavti <mario@mariovavti.com>2018-12-03 10:45:43 +0100
commit443d7684dbe8c1c3540df5aeb719403d67789747 (patch)
treee487fcf7e6f1976565a6ca60ddfef18e995c9ff4
parenta3ba7f0788705a6ebee57433e80712b282b0e784 (diff)
downloadvolse-hubzilla-443d7684dbe8c1c3540df5aeb719403d67789747.tar.gz
volse-hubzilla-443d7684dbe8c1c3540df5aeb719403d67789747.tar.bz2
volse-hubzilla-443d7684dbe8c1c3540df5aeb719403d67789747.zip
catch exception if readImageBlob() receives bogus data
-rw-r--r--include/photo/photo_imagick.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/photo/photo_imagick.php b/include/photo/photo_imagick.php
index 89577e71e..f04c00245 100644
--- a/include/photo/photo_imagick.php
+++ b/include/photo/photo_imagick.php
@@ -31,8 +31,12 @@ class photo_imagick extends photo_driver {
if(! $data)
return;
- $this->image->readImageBlob($data);
-
+ try {
+ $this->image->readImageBlob($data);
+ }
+ catch (Exception $e) {
+ logger('imagick readImageBlob() exception:' . print_r($e,true));
+ }
/**
* Setup the image to the format it will be saved to
@@ -205,4 +209,4 @@ class photo_imagick extends photo_driver {
-} \ No newline at end of file
+}