diff --git a/src/Intervention/Image/Image.php b/src/Intervention/Image/Image.php index 3ea07777..99745bdf 100644 --- a/src/Intervention/Image/Image.php +++ b/src/Intervention/Image/Image.php @@ -364,6 +364,7 @@ class Image } } elseif ($ratio && (! is_null($width) or ! is_null($height))) { + // If only one of width or height has been provided. $width = is_null($width) ? intval($height / $this->height * $this->width) : $width; $height = is_null($height) ? intval($width / $this->width * $this->height) : $height;