修正allowfield方法影响时间字段写入的问题

This commit is contained in:
thinkphp
2017-07-05 13:49:20 +08:00
parent ac7dbafab2
commit 094dde5d8d

View File

@@ -1099,6 +1099,9 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
$field = $this->field;
} elseif (!empty($this->field)) {
$field = array_merge($this->field, $auto);
if ($this->autoWriteTimestamp) {
array_push($field, $this->createTime, $this->updateTime);
}
} else {
$field = [];
}