summaryrefslogtreecommitdiffstats
path: root/lib/private/DB/QueryBuilder/QueryBuilder.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/DB/QueryBuilder/QueryBuilder.php')
-rw-r--r--lib/private/DB/QueryBuilder/QueryBuilder.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/private/DB/QueryBuilder/QueryBuilder.php b/lib/private/DB/QueryBuilder/QueryBuilder.php
index 0d0e6594b50..25e879b82be 100644
--- a/lib/private/DB/QueryBuilder/QueryBuilder.php
+++ b/lib/private/DB/QueryBuilder/QueryBuilder.php
@@ -807,12 +807,14 @@ class QueryBuilder implements IQueryBuilder {
* ->groupBy('u.id');
* </code>
*
- * @param mixed $groupBy The grouping expression.
+ * @param mixed ...$groupBys The grouping expression.
*
* @return \OCP\DB\QueryBuilder\IQueryBuilder This QueryBuilder instance.
*/
- public function groupBy($groupBy) {
- $groupBys = is_array($groupBy) ? $groupBy : func_get_args();
+ public function groupBy(...$groupBys) {
+ if (count($groupBys) === 1 && is_array($groupBys[0])) {
+ $$groupBys = $groupBys[0];
+ }
call_user_func_array(
[$this->queryBuilder, 'groupBy'],