mirror of
https://github.com/friendica/friendica
synced 2024-11-10 04:22:54 +00:00
Issue 14419: Avoid fatal errors with animated WebP images and GDlib
This commit is contained in:
parent
38ff423716
commit
7525d80d03
1 changed files with 6 additions and 0 deletions
|
@ -213,6 +213,12 @@ class Image
|
|||
}
|
||||
|
||||
$this->valid = false;
|
||||
|
||||
if (($this->originType == IMAGETYPE_WEBP) && $this->isAnimatedWebP(substr($data, 0, 90))) {
|
||||
DI::logger()->notice('Animated WebP images are unsupported by GDlib. Please install Imagick.', ['file' => $this->filename]);
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
$this->image = @imagecreatefromstring($data);
|
||||
if ($this->image !== false) {
|
||||
|
|
Loading…
Reference in a new issue