Merge branch 'feature/456' of https://github.com/tainacan/tainacan into feature/456

This commit is contained in:
mateuswetah 2020-12-17 17:09:20 -03:00
commit b1c5f8af1b
1 changed files with 4 additions and 2 deletions

View File

@ -144,8 +144,10 @@ class Item extends Entity {
}
private function get_iamge_blurhash($file_path, $width, $height) {
$image = imagecreatefromstring(file_get_contents($file_path));
if($image == false)
if (!$image = @imagecreatefromstring(file_get_contents($file_path))) {
return "L2OzSs00j[_3D%xuWBt700_3IU%M";
}
if($image == false)
return '';
$max_width = 45;