Merge pull request #290 from youyoushanyu/master

解决Model类db()方法在$this->field=true时重复被调用的而引发的问题
This commit is contained in:
ThinkPHP
2016-09-17 20:36:26 +08:00
committed by GitHub

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) {