From 2173ef5fb6025543398d2ee7b4d11c5c0971e92b Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 3 Dec 2018 09:45:43 +0000 Subject: catch exception if readImageBlob() receives bogus data (cherry picked from commit 443d7684dbe8c1c3540df5aeb719403d67789747) --- include/photo/photo_imagick.php | 10 +++++++--- 1 file 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 +} -- cgit v1.2.3