Merge pull request #138 from WeakSun/patch-3

修正$dataSet不存在索引0导致异常的情况
This commit is contained in:
ThinkPHP
2016-06-18 09:36:06 +08:00
committed by GitHub

View File

@@ -1610,7 +1610,7 @@ class Query
{
// 分析查询表达式
$options = $this->parseExpress();
if (!is_array($dataSet[0])) {
if (!is_array(reset($dataSet))) {
return false;
}
// 生成SQL语句