Skip to content

Commit

Permalink
修正allowfield方法影响时间字段写入的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
liu21st committed Jul 5, 2017
1 parent ac7dbaf commit 094dde5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions library/think/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -1099,6 +1099,9 @@ protected function checkAllowField($auto = [])
$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 = [];
}
Expand Down

0 comments on commit 094dde5

Please sign in to comment.