From 4a11e6f2ee3886d17f1fb5d78c58d5eae5c2e43e Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Wed, 1 Jan 2014 14:25:55 -0500 Subject: [PATCH] bug fixes. --- extensions/yii/imagine/BaseImage.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/extensions/yii/imagine/BaseImage.php b/extensions/yii/imagine/BaseImage.php index 1da31e1..960acef 100644 --- a/extensions/yii/imagine/BaseImage.php +++ b/extensions/yii/imagine/BaseImage.php @@ -59,10 +59,10 @@ class BaseImage */ public static function getImagine() { - if (static::$_imagine === null) { - static::$_imagine = static::createImagine(); + if (self::$_imagine === null) { + self::$_imagine = static::createImagine(); } - return static::$_imagine; + return self::$_imagine; } /** @@ -70,7 +70,7 @@ class BaseImage */ public static function setImagine($imagine) { - static::$_imagine = $imagine; + self::$_imagine = $imagine; } /** @@ -88,12 +88,12 @@ class BaseImage } break; case self::DRIVER_IMAGICK: - if (!class_exists('Imagick', false)) { + if (class_exists('Imagick', false)) { return new \Imagine\Imagick\Imagine(); } break; case self::DRIVER_GD2: - if (!function_exists('gd_info')) { + if (function_exists('gd_info')) { return new \Imagine\Gd\Imagine(); } break;