Преглед изворни кода

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

codemasher пре 4 година
родитељ
комит
92df74ea46
1 измењених фајлова са 1 додато и 1 уклоњено
  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.');
 		}