修正$dataSet不存在索引0导致报错的情况

当$dataSet不包含索引0的时候,会抛出异常,如:$dataSet = [1=>[……],'str'=>[……],……];
This commit is contained in:
WeakSun
2016-06-18 01:04:52 +08:00
committed by GitHub
parent 323b1884dc
commit 976215f1b8

View File

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