mirror of
https://github.com/friendica/friendica
synced 2025-01-03 20:02:19 +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;
|
$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 {
|
try {
|
||||||
$this->image = @imagecreatefromstring($data);
|
$this->image = @imagecreatefromstring($data);
|
||||||
if ($this->image !== false) {
|
if ($this->image !== false) {
|
||||||
|
|
Loading…
Reference in a new issue