diff options
Diffstat (limited to 'ext/gd/gd.c')
-rw-r--r-- | ext/gd/gd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 6c7958dd49..ab0af28e2f 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -1254,10 +1254,8 @@ static int _php_image_type (char data[8]) return PHP_GDIMG_TYPE_GD2; } else if (!memcmp(data, php_sig_jpg, 3)) { return PHP_GDIMG_TYPE_JPG; - } else if (!memcmp(data, php_sig_png, 3)) { - if (!memcmp(data, php_sig_png, 8)) { - return PHP_GDIMG_TYPE_PNG; - } + } else if (!memcmp(data, php_sig_png, 8)) { + return PHP_GDIMG_TYPE_PNG; } else if (!memcmp(data, php_sig_gif, 3)) { return PHP_GDIMG_TYPE_GIF; } |