修正Model类一处BUG

This commit is contained in:
thinkphp
2016-02-02 10:07:14 +08:00
parent 97166efd34
commit 6e7151145b
2 changed files with 6 additions and 5 deletions

View File

@@ -1114,7 +1114,7 @@ abstract class Driver
*/
public function getLastSql($model = '')
{
return $model ? $this->modelSql[$model] : $this->queryStr;
return ($model && isset($this->modelSql[$model])) ? $this->modelSql[$model] : $this->queryStr;
}
/**