Skip to content

Commit a9e3d55

Browse files
committed
fixed aspectRatio if width and height is not called first #57
1 parent 8a2f292 commit a9e3d55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Adapters/Adapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ public function getHeight()
404404
*/
405405
public function getAspectRatio()
406406
{
407-
if (!empty($this->width) && (strpos($this->width, '%') === false) && !empty($this->height) && (strpos($this->height, '%') === false)) {
407+
if ($this->width && (strpos($this->width, '%') === false) && $this->height && (strpos($this->height, '%') === false)) {
408408
return round(($this->height / $this->width) * 100, 3);
409409
}
410410
}

0 commit comments

Comments
 (0)