mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 06:08:21 +01:00
Merge pull request #2563 from acs-ferreira/patch-1
Create GDimage from data if JPEG fails - Fix #2561
This commit is contained in:
commit
90896d827b
@ -355,7 +355,10 @@ class ImageConverter
|
||||
$gdImage = imagecreatefromgif($fileName);
|
||||
break;
|
||||
case IMAGETYPE_JPEG:
|
||||
$gdImage = imagecreatefromjpeg($fileName);
|
||||
$gdImage = @imagecreatefromjpeg($fileName);
|
||||
if (!$gdImage) {
|
||||
$gdImage = imagecreatefromstring(file_get_contents($fileName));
|
||||
}
|
||||
break;
|
||||
}
|
||||
} catch (\Exception $ex) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user