From: Marek Bachmann Date: Wed, 28 Dec 2022 15:42:38 +0000 (+0100) Subject: removed one redundant check for height and width beeing set X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7b34fdc7152c75caa8f09ffc3569c55fc7e05598;p=friendica.git removed one redundant check for height and width beeing set --- 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']); } /**