diff --git a/src/Object/Image.php b/src/Object/Image.php index 7069f7a47f..1d2832f20a 100644 --- a/src/Object/Image.php +++ b/src/Object/Image.php @@ -734,15 +734,19 @@ class Image return ''; } - $width = $image->getWidth(); + $width = $image->getWidth(); $height = $image->getHeight(); if (max($width, $height) > 90) { $image->scaleDown(90); - $width = $image->getWidth(); + $width = $image->getWidth(); $height = $image->getHeight(); } + if (empty($width) || empty($height)) { + return ''; + } + $pixels = []; for ($y = 0; $y < $height; ++$y) { $row = [];