diff --git a/src/DataSet.php b/src/DataSet.php index 7d3d69f8..78b8539d 100644 --- a/src/DataSet.php +++ b/src/DataSet.php @@ -230,7 +230,7 @@ public function build($rowproc = null) case "array": //orderby - if (isset($this->orderby)) { + if (!empty($this->orderby)) { list($field, $direction) = $this->orderby; $column = array(); foreach ($this->source as $key => $row) { @@ -267,7 +267,7 @@ public function build($rowproc = null) case "query": case "model": //orderby - if (isset($this->orderby)) { + if (!empty($this->orderby)) { $this->query = $this->query->orderBy($this->orderby[0], $this->orderby[1]); }