Catch Imagick errors
See https://github.com/friendica/friendica/issues/9747#issuecomment-809675750
This commit is contained in:
parent
61a53af48b
commit
238adabefb
|
@ -230,9 +230,13 @@ class Image
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->isImagick()) {
|
if ($this->isImagick()) {
|
||||||
|
try {
|
||||||
/* Clean it */
|
/* Clean it */
|
||||||
$this->image = $this->image->deconstructImages();
|
$this->image = $this->image->deconstructImages();
|
||||||
return $this->image;
|
return $this->image;
|
||||||
|
} catch (Exception $e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $this->image;
|
return $this->image;
|
||||||
}
|
}
|
||||||
|
@ -676,10 +680,14 @@ class Image
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->isImagick()) {
|
if ($this->isImagick()) {
|
||||||
|
try {
|
||||||
/* Clean it */
|
/* Clean it */
|
||||||
$this->image = $this->image->deconstructImages();
|
$this->image = $this->image->deconstructImages();
|
||||||
$string = $this->image->getImagesBlob();
|
$string = $this->image->getImagesBlob();
|
||||||
return $string;
|
return $string;
|
||||||
|
} catch (Exception $e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
Loading…
Reference in a new issue