diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-12-03 09:45:43 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2018-12-03 10:48:39 +0100 |
commit | 2173ef5fb6025543398d2ee7b4d11c5c0971e92b (patch) | |
tree | d8e1c26e9bf4aba749be46a2b436da48722ec47c /include/photo/photo_imagick.php | |
parent | 1f6da1c653ef93422239e301d5f4ec258145a556 (diff) | |
download | volse-hubzilla-2173ef5fb6025543398d2ee7b4d11c5c0971e92b.tar.gz volse-hubzilla-2173ef5fb6025543398d2ee7b4d11c5c0971e92b.tar.bz2 volse-hubzilla-2173ef5fb6025543398d2ee7b4d11c5c0971e92b.zip |
catch exception if readImageBlob() receives bogus data
(cherry picked from commit 443d7684dbe8c1c3540df5aeb719403d67789747)
Diffstat (limited to 'include/photo/photo_imagick.php')
-rw-r--r-- | include/photo/photo_imagick.php | 10 |
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 +} |