Skip to content

Commit

Permalink
Support for arrays being passed to group function.
Browse files Browse the repository at this point in the history
  • Loading branch information
lmcculley committed Feb 4, 2015
1 parent 1d51bba commit b87fa7f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions libraries/joomla/database/query/sqlsrv.php
Expand Up @@ -371,8 +371,11 @@ public function setLimit($limit = 0, $offset = 0)
*/
public function group($columns)
{
// Transform $columns into an array for filtering purposes
$columns = explode(",", str_replace(" ", "", $columns));
if (!is_array($columns))
{
// Transform $columns into an array for filtering purposes
$columns = explode(",", str_replace(" ", "", $columns));
}

// Get the _formatted_ FROM string and remove everything except `table AS alias`
$fromStr = str_replace(array("[","]"), "", str_replace("#__", $this->db->getPrefix(), str_replace("FROM ", "", (string) $this->from)));
Expand Down

0 comments on commit b87fa7f

Please sign in to comment.