Fix gd test

pull/167/head
Fred Cox 2020-09-18 21:22:23 +03:00
parent 7ce97ab6ed
commit 01c511fbeb
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ decimal 7.0 7.1 7.2 7.3 7.4
enchant 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0
exif 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0
ffi 7.4 8.0
gd 5.5 5.6 7.0 7.1 7.2 7.3 7.4
gd 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0
gettext 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0
gmagick 5.5 5.6 7.0 7.1 7.2 7.3 7.4
gmp 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0

View File

@ -55,7 +55,7 @@ try {
$image2 = $loadFuntion($tempFile);
unlink($tempFile);
$tempFile = null;
if (!is_resource($image2) || imagesx($image2) !== $imageWidth || imagesy($image2) !== $imageHeight) {
if (!(is_resource($image2) || is_object($image2)) || imagesx($image2) !== $imageWidth || imagesy($image2) !== $imageHeight) {
throw new Exception("{$loadFuntion}() failed");
}
imagedestroy($image2);