From 53f6d41ef429ffa4c61bcf2d527971c04164fcfb Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 2 Aug 2016 18:04:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BValidate=E7=B1=BB=E7=9A=84boo?= =?UTF-8?q?lean=E9=AA=8C=E8=AF=81=E8=A7=84=E5=88=99=20=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E6=95=B0=E6=8D=AE?= 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 7f230db8..9091ee9c 100644 --- a/library/think/Validate.php +++ b/library/think/Validate.php @@ -551,7 +551,7 @@ class Validate break; case 'boolean': // 是否为布尔值 - $result = $this->filter($value, FILTER_VALIDATE_BOOLEAN); + $result = in_array($value, ['true', 'false', 0, 1, true, false]); break; case 'array': // 是否为数组