From 2ba3c7cfa78f60f2dade8853c4fad3147bc1e337 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sat, 27 Feb 2016 11:24:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=E6=95=B0=E6=8D=AE=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E9=AA=8C=E8=AF=81=E7=9A=84=E9=94=99=E8=AF=AF=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Model.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/library/think/Model.php b/library/think/Model.php index e3439301..43486065 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -1031,7 +1031,11 @@ class Model // 没有返回true 则表示验证失败 if (!empty($options['patch'])) { // 批量验证 - $this->error[] = $result; + if (is_array($result)) { + $this->error[] = $result; + } else { + $this->error[$key] = $result; + } } else { $this->error = $result; return;