mirror of
https://github.com/Intervention/image.git
synced 2025-08-30 17:19:50 +02:00
Simplify GIF magic number detection (#1446)
Removed unnecessary bin2hex() conversion.
This commit is contained in:
@@ -24,10 +24,7 @@ abstract class AbstractDecoder implements DecoderInterface
|
|||||||
{
|
{
|
||||||
$head = substr($input, 0, 6);
|
$head = substr($input, 0, 6);
|
||||||
|
|
||||||
return 1 === preg_match(
|
return $head === 'GIF87a' || $head === 'GIF89a';
|
||||||
"/^47494638(37|39)61/",
|
|
||||||
strtoupper(bin2hex($head))
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user