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