XFRM\Service\ResourceItem\Icon::updateIcon can fail with an internal server error instead of returning false

Previously updateIcon had a guard statement around if imageFromFile failed, but the added isOptimized check misses that.


PHP:

Код:
$baseImage = $imageManager->imageFromFile($this->fileName);
$isOptimized = $baseImage->getType() === IMAGETYPE_WEBP;
unset($baseImage);

if ($this->width != $targetSize || $this->height != $targetSize)
{
    $image = $imageManager->imageFromFile($this->fileName);
    if (!$image)
    {
        return false;
    }

This can result in an internal...

Read more

Читать далее...
 
Активность
Пока что здесь никого нет
Назад
Верх Низ