Skip to content

Commit

Permalink
ActiveQuery::addSelect added casting param to array
Browse files Browse the repository at this point in the history
  • Loading branch information
tafid committed Jul 19, 2016
1 parent 3d00dcd commit 659b57b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ActiveQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,16 @@ public function select($columns)
return $this;
}

/**
* @param array|string $columns
* @return $this
*/
public function addSelect($columns)
{
if (!is_array($columns)) {
$columns = (array) $columns;
}

if ($this->select === null) {
$this->select = $columns;
} else {
Expand Down

0 comments on commit 659b57b

Please sign in to comment.