Don't calculate the blurhash on images without a size
This commit is contained in:
parent
8e25660616
commit
e6f0e3c23e
|
@ -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 = [];
|
||||
|
|
Loading…
Reference in New Issue
Block a user