From 67e5dd14c61db2df9d0ff51e7a1eb43c0cba093d Mon Sep 17 00:00:00 2001 From: Lucas Bartholemy Date: Fri, 6 Nov 2020 10:20:05 +0100 Subject: [PATCH 1/2] Fix #4609: Error on downscale command --- CHANGELOG.md | 1 + protected/humhub/modules/file/libs/ImageHelper.php | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6ec3bf2a1..7392e9b66d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ HumHub Changelog ------------------------ - Fix #4590: Page loader color contrast too low - Fix #4599: File preview not visible if initialized in background +- Fix #4609: Error on downscale command 1.7.0-beta.2 (October 26, 2020) diff --git a/protected/humhub/modules/file/libs/ImageHelper.php b/protected/humhub/modules/file/libs/ImageHelper.php index fcb142c7ce..97a35ec512 100644 --- a/protected/humhub/modules/file/libs/ImageHelper.php +++ b/protected/humhub/modules/file/libs/ImageHelper.php @@ -105,7 +105,13 @@ class ImageHelper return; } - $image = Image::getImagine()->open($file->store->get()); + try { + $image = Image::getImagine()->open($file->store->get()); + } catch (\Exception $ex) { + Yii::error('Could not open image ' . $file->store->get() . '. Error: ' . $ex->getMessage(), 'file'); + return; + } + static::fixJpegOrientation($image, $file); if ($module->imageMaxResolution !== null) { From ad6385eb6196dcdf0b4d5b33f3bcbb7b3d75875a Mon Sep 17 00:00:00 2001 From: Lucas Bartholemy Date: Fri, 6 Nov 2020 11:48:20 +0100 Subject: [PATCH 2/2] Update common.php --- protected/humhub/config/common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protected/humhub/config/common.php b/protected/humhub/config/common.php index 5f61ab81ec..eef5932262 100644 --- a/protected/humhub/config/common.php +++ b/protected/humhub/config/common.php @@ -24,7 +24,7 @@ if (!defined('PKCS7_DETACHED')) { $config = [ 'name' => 'HumHub', - 'version' => '1.8.0-dev', + 'version' => '1.7.1', 'basePath' => dirname(__DIR__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR, 'bootstrap' => ['log', 'humhub\components\bootstrap\ModuleAutoLoader', 'queue', 'humhub\modules\ui\view\bootstrap\ThemeLoader'], 'sourceLanguage' => 'en',