升级thinkphp到5.1.39

This commit is contained in:
cxdbz committed 2019-11-28 19:33:13 +08:00
1 parent c8839fa4f8
commit a58d04e7e2
37 files changed
+546 -192

No files matched your search

+11 -4
View File
@@ -780,12 +780,19 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
// 删除条件
$pk = $this->getPk();
$where = [];
if (is_string($pk) && isset($this->data[$pk])) {
$where[] = [$pk, '=', $this->data[$pk]];
} elseif (!empty($this->updateWhere)) {
$where = $this->updateWhere;
} else {
$where = null;
} elseif (is_array($pk)) {
foreach ($pk as $field) {
if (isset($this->data[$field])) {
$where[] = [$field, '=', $this->data[$field]];
}
}
}
if (empty($where)) {
$where = empty($this->updateWhere) ? null : $this->updateWhere;
}
return $where;