// if($this->valid()) { // FIXME: I get an error: "PHP Fatal error: Using $this when not in object context..." WTF?
if(self::valid()) { // And here I get a warning: "PHP Strict Standards: Non-static method OC_Image::valid() should not be called statically..." valid() shouldn't be a static member as it would fail on a non-instantiated class.
if($this->valid()) {
self::$imagetype = $itype;
self::$destroy = true;
}
@ -256,7 +255,7 @@ class OC_Image {
* @param $str A string of image data as read from a file.
* @returns An image resource or false on error
*/
static public function loadFromData($str) {
public function loadFromData($str) {
if(is_resource($str)) {
return false;
}
@ -274,7 +273,7 @@ class OC_Image {
* @param $str A string base64 encoded string of image data.