From 6e9a18955bf83aa83563ff276f9fdc39eaf4e502 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sun, 8 May 2016 22:42:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3Model=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/Model.php b/library/think/Model.php index 31b7c857..f0c693a4 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -598,7 +598,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess protected static function parseQuery(&$data, $with, $cache) { $result = self::with($with)->cache($cache); - if (is_array($data)) { + if (is_array($data) && key($data) !== 0) { $result = $result->where($data); $data = []; } elseif ($data instanceof \Closure) {