mirror of
https://github.com/friendica/friendica
synced 2024-12-22 23:20:16 +00:00
Fix fatal error: Uncaught ImagickException: cache resources exhausted
This commit is contained in:
parent
78121afcb0
commit
2c1e9b92eb
1 changed files with 5 additions and 2 deletions
|
@ -22,7 +22,6 @@
|
|||
namespace Friendica\Object;
|
||||
|
||||
use Exception;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\DI;
|
||||
use Friendica\Util\Images;
|
||||
use Imagick;
|
||||
|
@ -123,7 +122,11 @@ class Image
|
|||
$this->image->setFormat($format);
|
||||
|
||||
// Always coalesce, if it is not a multi-frame image it won't hurt anyway
|
||||
$this->image = $this->image->coalesceImages();
|
||||
try {
|
||||
$this->image = $this->image->coalesceImages();
|
||||
} catch (Exception $e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* setup the compression here, so we'll do it only once
|
||||
|
|
Loading…
Reference in a new issue