mirror of
https://github.com/Intervention/image.git
synced 2025-08-30 17:19:50 +02:00
Optimize GIF detection
This commit is contained in:
@@ -22,9 +22,7 @@ abstract class AbstractDecoder implements DecoderInterface
|
||||
*/
|
||||
protected function isGifFormat(string $input): bool
|
||||
{
|
||||
$head = substr($input, 0, 6);
|
||||
|
||||
return $head === 'GIF87a' || $head === 'GIF89a';
|
||||
return str_starts_with($input, 'GIF87a') || str_starts_with($input, 'GIF89a');
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user