From 92df74ea466d8b42c95befa869f43f9b00e7e5cb Mon Sep 17 00:00:00 2001 From: codemasher Date: Fri, 19 Nov 2021 16:00:58 +0100 Subject: [PATCH] :octocat: shouldn't have touched it... --- src/Decoder/GDLuminanceSource.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Decoder/GDLuminanceSource.php b/src/Decoder/GDLuminanceSource.php index 61939f19a..00e372abb 100644 --- a/src/Decoder/GDLuminanceSource.php +++ b/src/Decoder/GDLuminanceSource.php @@ -41,7 +41,7 @@ final class GDLuminanceSource extends LuminanceSourceAbstract{ /** @noinspection PhpFullyQualifiedNameUsageInspection */ if( (PHP_MAJOR_VERSION >= 8 && !$gdImage instanceof \GdImage) - || (!is_resource($gdImage) || get_resource_type($gdImage) !== 'gd') + || (PHP_MAJOR_VERSION < 8 && (!is_resource($gdImage) || get_resource_type($gdImage) !== 'gd')) ){ throw new InvalidArgumentException('Invalid GD image source.'); }