summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-09-03 07:50:11 +0200
committerGitHub <noreply@github.com>2019-09-03 07:50:11 +0200
commit618873457937323bee425b7670ecc17553deda47 (patch)
tree69bbdc1d84eba6c603d33c5b3f26ce447d87634e /lib
parentd22ab5e7a9e12477ab69695461a7881deb5e813c (diff)
parent94eb77a535bde17ee3b7c1819c80c686c763b804 (diff)
downloadnextcloud-server-618873457937323bee425b7670ecc17553deda47.tar.gz
nextcloud-server-618873457937323bee425b7670ecc17553deda47.zip
Merge pull request #16964 from phpbg/master
Fix sanity checks #16963
Diffstat (limited to 'lib')
-rw-r--r--lib/private/legacy/image.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/private/legacy/image.php b/lib/private/legacy/image.php
index d9af45f2226..2efde2ee688 100644
--- a/lib/private/legacy/image.php
+++ b/lib/private/legacy/image.php
@@ -878,10 +878,8 @@ class OC_Image implements \OCP\IImage {
$widthOrig = imagesx($this->resource);
$heightOrig = imagesy($this->resource);
$process = imagecreatetruecolor($width, $height);
-
- if ($process == false) {
+ if ($process === false) {
$this->logger->error(__METHOD__ . '(): Error creating true color image', array('app' => 'core'));
- imagedestroy($process);
return false;
}
@@ -892,8 +890,8 @@ class OC_Image implements \OCP\IImage {
imagesavealpha($process, true);
}
- imagecopyresampled($process, $this->resource, 0, 0, 0, 0, $width, $height, $widthOrig, $heightOrig);
- if ($process == false) {
+ $res = imagecopyresampled($process, $this->resource, 0, 0, 0, 0, $width, $height, $widthOrig, $heightOrig);
+ if ($res === false) {
$this->logger->error(__METHOD__ . '(): Error re-sampling process image', array('app' => 'core'));
imagedestroy($process);
return false;