Merge pull request #10144 from annando/catch-imagick-error
Catch Imagick errors
This commit is contained in:
commit
0b239f368b
1 changed files with 15 additions and 7 deletions
|
@ -230,9 +230,13 @@ class Image
|
|||
}
|
||||
|
||||
if ($this->isImagick()) {
|
||||
try {
|
||||
/* Clean it */
|
||||
$this->image = $this->image->deconstructImages();
|
||||
return $this->image;
|
||||
} catch (Exception $e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return $this->image;
|
||||
}
|
||||
|
@ -676,10 +680,14 @@ class Image
|
|||
}
|
||||
|
||||
if ($this->isImagick()) {
|
||||
try {
|
||||
/* Clean it */
|
||||
$this->image = $this->image->deconstructImages();
|
||||
$string = $this->image->getImagesBlob();
|
||||
return $string;
|
||||
} catch (Exception $e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
ob_start();
|
||||
|
|
Loading…
Reference in a new issue