From f3aa05f8081571bfb733a7347085f088b0d81acb Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sun, 30 Apr 2017 21:45:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BRequest=E7=B1=BBfilterValue?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Request.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/Request.php b/library/think/Request.php index 1eb7f297..803a5240 100644 --- a/library/think/Request.php +++ b/library/think/Request.php @@ -1060,7 +1060,7 @@ class Request // 调用函数或者方法过滤 $value = call_user_func($filter, $value); } elseif (is_scalar($value)) { - if (strpos($filter, '/')) { + if (false !== strpos($filter, '/')) { // 正则过滤 if (!preg_match($filter, $value)) { // 匹配不成功返回默认值