From 365b2a36aa774bd0af4ad3cf0b2e391c968d0700 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 20 Feb 2017 18:37:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3update=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/db/Query.php b/library/think/db/Query.php index 93b034b6..67619109 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -2210,7 +2210,7 @@ class Query // 执行操作 $result = '' == $sql ? 0 : $this->execute($sql, $bind); if ($result) { - if (isset($where[$pk])) { + if (is_string($pk) && isset($where[$pk])) { $data[$pk] = $where[$pk]; } elseif (is_string($pk) && isset($key) && strpos($key, '|')) { list($a, $val) = explode('|', $key);