From 7b34fdc7152c75caa8f09ffc3569c55fc7e05598 Mon Sep 17 00:00:00 2001 From: Marek Bachmann Date: Wed, 28 Dec 2022 16:42:38 +0100 Subject: [PATCH] removed one redundant check for height and width beeing set --- src/Object/Image.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Object/Image.php b/src/Object/Image.php index 430ad6f139..67a1af3d1e 100644 --- a/src/Object/Image.php +++ b/src/Object/Image.php @@ -285,12 +285,13 @@ class Image $width = $this->getWidth(); $height = $this->getHeight(); - if ((! $width)|| (! $height)) { + $scale = Images::getScalingDimensions($width, $height,$max); + if ($scale) { + return $this->scale($scale['width'], $scale['height']); + } else { return false; } - $scale = Images::getScalingDimensions($width, $height,$max); - return $this->scale($scale['width'], $scale['height']); } /**