Commit 8c3ba7db authored by guilhermeblanco's avatar guilhermeblanco

[2.0][DDC-249] Fixed issue that documentation refers QueryBuilder::select()...

[2.0][DDC-249] Fixed issue that documentation refers QueryBuilder::select() supports array, but it was only restricted to strings.
parent 2ff76e44
......@@ -401,12 +401,13 @@ class QueryBuilder
public function select($select = null)
{
$this->_type = self::SELECT;
$selects = func_get_args();
if (empty($selects)) {
if (empty($select)) {
return $this;
}
$selects = is_array($select) ? $select : func_get_args();
return $this->add('select', new Expr\Select($selects), false);
}
......@@ -426,11 +427,12 @@ class QueryBuilder
public function addSelect($select = null)
{
$this->_type = self::SELECT;
$selects = func_get_args();
if (empty($selects)) {
return $this;
if (empty($select)) {
return $this;
}
$selects = is_array($select) ? $select : func_get_args();
return $this->add('select', new Expr\Select($selects), true);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment