We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4e9bdd commit 3ac9336Copy full SHA for 3ac9336
src/FileApi.php
@@ -193,16 +193,14 @@ private function setTmpImage($upload_file)
193
{
194
$image_types = array('image/png', 'image/gif', 'image/jpeg', 'image/jpg');
195
$image_path = $upload_file instanceof UploadedFile ? $upload_file->getRealPath() : $upload_file;
196
+ $img = null;
197
198
if (in_array(\File::mimeType($upload_file), $image_types)) {
199
switch (\File::mimeType($upload_file)) {
200
case 'image/png':
201
$img = imagecreatefrompng($image_path);
202
break;
203
case 'image/gif':
- $img = imagecreatefromgif($image_path);
204
- imagegif($img, $image_path);
205
- break;
206
case 'image/jpeg':
207
case 'image/jpg':
208
default:
0 commit comments