1
0
Fork 0
mirror of synced 2025-04-01 12:26:11 +03:00

[2.0][DDC-249] Fixed issue that documentation refers QueryBuilder::select() supports array, but it was only restricted to strings.

This commit is contained in:
guilhermeblanco 2010-01-14 16:14:41 +00:00
parent 2ff76e44c0
commit 8c3ba7dbf0

View file

@ -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);
}