From 968627b5f33d1381f8545d2148c409d6ddf61925 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 8 Apr 2016 10:31:25 +0800 Subject: [PATCH] * fix bug for no function imagecreatefromjpeg. --- module/file/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/file/model.php b/module/file/model.php index 730bb8f454..8bea67331d 100644 --- a/module/file/model.php +++ b/module/file/model.php @@ -531,7 +531,7 @@ class fileModel extends model */ public function compressImage($file) { - if(!extension_loaded('gd')) return $file; + if(!extension_loaded('gd') or !function_exists('imagecreatefromjpeg')) return $file; $pathName = $file['pathname']; $fileName = $this->savePath . $pathName;