Browse Source

Set protected static $sizes default value - array(). Correct to getting sizes use with static::

master
Alexander Demidov 12 years ago
parent
commit
08d64bb277
  1. 9
      Image.class.php

9
Image.class.php

@ -10,7 +10,7 @@ class Image extends File
public $original_filename; public $original_filename;
public $variants = array(); public $variants = array();
protected static $sizes;
protected static $sizes = array();
/** /**
* @param $class string * @param $class string
@ -31,11 +31,16 @@ class Image extends File
public function getSizes() public function getSizes()
{ {
return self::$sizes;
return static::$sizes;
} }
public function getVariant($size) public function getVariant($size)
{ {
return parent::getImageVariant($size); return parent::getImageVariant($size);
} }
public function getIsNoEmpty()
{
return (bool) $this->size;
}
} }
Loading…
Cancel
Save