From e6f0e3c23eb29a878242fadc38a648a16b70261e Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 20 Dec 2022 22:32:24 +0000 Subject: [PATCH] Don't calculate the blurhash on images without a size --- src/Object/Image.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 = []; -- 2.39.5