From e0d0cfcc0ea26ee89599df0ea8813adf7a0a6e1b Mon Sep 17 00:00:00 2001 From: Ricardo Bartels Date: Fri, 11 Apr 2014 00:24:06 +0200 Subject: [PATCH] fix check for imagick #107 class_exists() triggerd __autoload and __autoload failed because Imagick.php doesn't exists. Change function to "extension_loaded()" Refs: #107 --- php/modules/upload.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/php/modules/upload.php b/php/modules/upload.php index ebbe64e..fe42790 100644 --- a/php/modules/upload.php +++ b/php/modules/upload.php @@ -69,7 +69,7 @@ function upload($files, $albumID, $description = '', $tags = '') { // Set orientation based on EXIF data if ($file['type'] === 'image/jpeg' && isset($info['orientation']) && isset($info['width']) && isset($info['height'])) { - if(class_exists('Imagick')) { + if(extension_loaded('imagick')) { $rotateImage = 0; @@ -306,7 +306,7 @@ function createThumb($filename, $width = 200, $height = 200) { $newUrl2x = __DIR__ . '/../../uploads/thumb/' . $photoName[0] . '@2x.jpeg'; // create thumbnails with Imagick - if (class_exists('Imagick')) { + if(extension_loaded('imagick')) { // read image $thumb = new Imagick();