mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
修正Model类save方法
This commit is contained in:
@@ -870,9 +870,11 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($data) && $this->autoWriteTimestamp && $this->updateTime && !isset($data[$this->updateTime])) {
|
if (!empty($data)) {
|
||||||
// 自动写入更新时间
|
if ($this->autoWriteTimestamp && $this->updateTime && !isset($data[$this->updateTime])) {
|
||||||
$data[$this->updateTime] = $this->autoWriteTimestamp($this->updateTime);
|
// 自动写入更新时间
|
||||||
|
$data[$this->updateTime] = $this->autoWriteTimestamp($this->updateTime);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user