From 1bc85bb5be30f1cbbff66eae307ca4f0285300cf Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 18 Jul 2016 15:26:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BValidate=E7=B1=BB=E7=9A=84ima?= =?UTF-8?q?ge=E9=AA=8C=E8=AF=81=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Validate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/Validate.php b/library/think/Validate.php index c88d5b13..203eb944 100644 --- a/library/think/Validate.php +++ b/library/think/Validate.php @@ -547,7 +547,7 @@ class Validate $result = $value instanceof \think\File; break; case 'image': - $result = $value instanceof \think\File && exif_imagetype($value->getRealPath()); + $result = $value instanceof \think\File && in_array(exif_imagetype($value->getRealPath()), [1, 2, 3, 6]); break; default: if (isset(self::$type[$rule])) {