From d6118aa53eb8061c291e3011c6146516d9282833 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Fri, 27 Oct 2017 13:34:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Validate.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/library/think/Validate.php b/library/think/Validate.php index 1b9a99ea..53e87ead 100644 --- a/library/think/Validate.php +++ b/library/think/Validate.php @@ -847,11 +847,7 @@ class Validate } $pk = strval(isset($rule[3]) ? $rule[3] : $db->getPk()); - if(is_array($pk)){ - foreach($pk as $key){ - $map[$key] = ['neq',] - } - }elseif (isset($rule[2])) { + if (isset($rule[2])) { $map[$pk] = ['neq', $rule[2]]; } elseif (isset($data[$pk])) { $map[$pk] = ['neq', $data[$pk]]; @@ -1242,7 +1238,7 @@ class Validate if (is_string($msg) && 0 === strpos($msg, '{%')) { $msg = Lang::get(substr($msg, 2, -1)); - }elseif(Lang::has($msg)){ + } elseif (Lang::has($msg)) { $msg = Lang::get($msg); }