From f77a48930a8dbb253eebc8cef11a1d09d3524f3b Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 13 Dec 2016 14:29:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BValidate=E7=9A=84getRuleMsg?= =?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/Validate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/Validate.php b/library/think/Validate.php index cb113bc2..d68811f0 100644 --- a/library/think/Validate.php +++ b/library/think/Validate.php @@ -1215,7 +1215,7 @@ class Validate $msg = Lang::get(substr($msg, 2, -1)); } - if (is_string($msg) && false !== strpos($msg, ':')) { + if (is_string($msg) && is_string($rule) && false !== strpos($msg, ':')) { // 变量替换 if (strpos($rule, ',')) { $array = array_pad(explode(',', $rule), 3, '');