修复在配置Model属性field=true情况下,通过__call调用db()引发的BUG

This commit is contained in:
shanyu
2016-09-16 16:19:40 +08:00
parent 8ff2e4fe5b
commit 9a0df4ef04

View File

@@ -158,7 +158,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
if (!empty($this->field)) {
if (true === $this->field) {
$type = $this->db()->getTableInfo('', 'type');
$type = $query->getTableInfo('', 'type');
} else {
$type = [];
foreach ((array) $this->field as $key => $val) {