From 35ae8decf73673109621cb242ebc7e23b4c23deb Mon Sep 17 00:00:00 2001 From: thinkphp Date: Fri, 20 Jan 2017 12:37:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E9=AA=8C=E8=AF=81=E7=B1=BB?= =?UTF-8?q?=E7=9A=84=E5=B8=83=E5=B0=94=E5=80=BC=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 e91ee338..ac9e6d55 100644 --- a/library/think/Validate.php +++ b/library/think/Validate.php @@ -591,7 +591,7 @@ class Validate break; case 'boolean': // 是否为布尔值 - $result = in_array($value, [0, 1, true, false]); + $result = in_array($value, [true, false, 0, 1, '0', '1'], true); break; case 'array': // 是否为数组