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

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
25,817
Points
823

Reputation:

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

PHP:

Code:
$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

Continue reading...
 
Status
Not open for further replies.
Top