check if ->resource is a resource
This commit is contained in:
parent
7a11911aea
commit
4574c5cf5c
|
@ -496,8 +496,10 @@ class OC_Image {
|
|||
return false;
|
||||
}
|
||||
$this->resource = @imagecreatefromstring($str);
|
||||
imagealphablending($this->resource, false);
|
||||
imagesavealpha($this->resource, true);
|
||||
if(is_resource($this->resource)) {
|
||||
imagealphablending($this->resource, false);
|
||||
imagesavealpha($this->resource, true);
|
||||
}
|
||||
|
||||
if(!$this->resource) {
|
||||
OC_Log::write('core', 'OC_Image->loadFromData, couldn\'t load', OC_Log::DEBUG);
|
||||
|
|
Loading…
Reference in New Issue