Update src/Model/Photo.php

Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
Michael Vogel 2021-03-26 15:51:26 +01:00 committed by GitHub
parent e98d11a9ae
commit 0539c788ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -464,7 +464,7 @@ class Photo
$maximagesize = DI::config()->get('system', 'maximagesize'); $maximagesize = DI::config()->get('system', 'maximagesize');
if (!empty($maximagesize) && ($filesize > $maximagesize)) { if (!empty($maximagesize) && ($filesize > $maximagesize)) {
Logger::info('Avatar exceeds image limit', ['uid' => $uid, 'cid' => $cid, 'maximagesize' => $maximagesize, 'size' => $filesize, 'type' => $Image->getType()]); Logger::info('Avatar exceeds image limit', ['uid' => $uid, 'cid' => $cid, 'maximagesize' => $maximagesize, 'size' => $filesize, 'type' => $Image->getType()]);
if (($Image->getType() == 'image/gif')) { if ($Image->getType() == 'image/gif') {
$Image->toStatic(); $Image->toStatic();
$Image = new Image($Image->asString(), 'image/png'); $Image = new Image($Image->asString(), 'image/png');