Explorar el Código

:octocat: shouldn't have touched it...

codemasher hace 4 años
padre
commit
92df74ea46
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/Decoder/GDLuminanceSource.php

+ 1 - 1
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.');
 		}