From 01c511fbebe5947a54fcc1e0b17fa4faae8d6e08 Mon Sep 17 00:00:00 2001 From: Fred Cox Date: Fri, 18 Sep 2020 21:22:23 +0300 Subject: [PATCH] Fix gd test --- data/supported-extensions | 2 +- scripts/tests/gd.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/supported-extensions b/data/supported-extensions index 62e4c16..0337d06 100644 --- a/data/supported-extensions +++ b/data/supported-extensions @@ -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 diff --git a/scripts/tests/gd.php b/scripts/tests/gd.php index f7b562b..e9406a0 100644 --- a/scripts/tests/gd.php +++ b/scripts/tests/gd.php @@ -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);