修正Model类

This commit is contained in:
thinkphp
2016-04-26 08:37:18 +08:00
parent 67c47dd526
commit 61a97ab69d

View File

@@ -163,7 +163,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
$item[$key] = $data;
} else {
// 模型属性
$item[$key] = $this->$key;
$item[$key] = $this->__get($key);
}
}
return !empty($item) ? $item : [];