修正update方法

This commit is contained in:
thinkphp
2017-02-20 18:37:38 +08:00
parent 46353f20a0
commit 365b2a36aa

View File

@@ -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);