mirror of
https://github.com/friendica/friendica
synced 2024-12-22 22:40:16 +00:00
Merge pull request #14443 from annando/webp-animated
Issue 14419: Avoid fatal errors with animated WebP images and GDlib
This commit is contained in:
commit
30aac5f1b3
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