]> git.mxchange.org Git - friendica.git/commitdiff
removed one redundant check for height and width beeing set
authorMarek Bachmann <marek.bachmann@comtec.eecs.uni-kassel.de>
Wed, 28 Dec 2022 15:42:38 +0000 (16:42 +0100)
committerMarek Bachmann <marek.bachmann@comtec.eecs.uni-kassel.de>
Wed, 28 Dec 2022 15:42:38 +0000 (16:42 +0100)
src/Object/Image.php

index 430ad6f139155b56e68ae8e523ab9bdf99a9bfd7..67a1af3d1ec47b374f7c9fa49f1301468bcae380 100644 (file)
@@ -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']);
        }
 
        /**