From 08d64bb277a302b4677b15210012c48d78354543 Mon Sep 17 00:00:00 2001 From: Alexander Demidov Date: Mon, 10 Jun 2013 22:06:52 +0400 Subject: [PATCH] Set protected static $sizes default value - array(). Correct to getting sizes use with static:: --- Image.class.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Image.class.php b/Image.class.php index 8a13e49..2dd5bcf 100644 --- a/Image.class.php +++ b/Image.class.php @@ -10,7 +10,7 @@ class Image extends File public $original_filename; public $variants = array(); - protected static $sizes; + protected static $sizes = array(); /** * @param $class string @@ -31,11 +31,16 @@ class Image extends File public function getSizes() { - return self::$sizes; + return static::$sizes; } public function getVariant($size) { return parent::getImageVariant($size); } + + public function getIsNoEmpty() + { + return (bool) $this->size; + } } \ No newline at end of file