From 977594d40f984ef5f83fcd0e4cc12864bf985071 Mon Sep 17 00:00:00 2001 From: Youchen Lee Date: Tue, 3 Oct 2017 00:30:34 +0800 Subject: [PATCH] Add default value to "should_create_thumbnails" for backward compatibility. --- src/controllers/CropController.php | 2 +- src/traits/LfmHelpers.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/CropController.php b/src/controllers/CropController.php index 5d27d422..ccb7de24 100644 --- a/src/controllers/CropController.php +++ b/src/controllers/CropController.php @@ -49,7 +49,7 @@ public function getCropimage($overWrite = true) ->crop($dataWidth, $dataHeight, $dataX, $dataY) ->save($crop_path); - if (config('lfm.should_create_thumbnails')) { + if (config('lfm.should_create_thumbnails', true)) { // create thumb folder parent::createFolderByPath(parent::getThumbPath()); diff --git a/src/traits/LfmHelpers.php b/src/traits/LfmHelpers.php index 6cfacd37..c0427128 100644 --- a/src/traits/LfmHelpers.php +++ b/src/traits/LfmHelpers.php @@ -529,7 +529,7 @@ public function fileIsImage($file) */ public function imageShouldHaveThumb($file) { - if (! config('lfm.should_create_thumbnails')) { + if (! config('lfm.should_create_thumbnails', true)) { return false; }