修正Model类的字段类型获取

This commit is contained in:
thinkphp
2016-05-20 15:52:32 +08:00
parent 92496f65a1
commit d4993fa37c

View File

@@ -955,7 +955,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
*/ */
public function __set($name, $value) public function __set($name, $value)
{ {
if (is_null($this->fieldType)) { if (empty($this->fieldType)) {
// 获取字段类型信息并缓存 // 获取字段类型信息并缓存
$this->fieldType = $this->db()->getTableInfo('', 'type'); $this->fieldType = $this->db()->getTableInfo('', 'type');
} }