diff --git a/lib/private/DB/QueryBuilder/QueryBuilder.php b/lib/private/DB/QueryBuilder/QueryBuilder.php index 57a0e1babd..86e3eac14f 100644 --- a/lib/private/DB/QueryBuilder/QueryBuilder.php +++ b/lib/private/DB/QueryBuilder/QueryBuilder.php @@ -914,14 +914,14 @@ class QueryBuilder implements IQueryBuilder { * Specifies a restriction over the groups of the query. * Replaces any previous having restrictions, if any. * - * @param mixed $having The restriction over the groups. + * @param mixed ...$having The restriction over the groups. * * @return \OCP\DB\QueryBuilder\IQueryBuilder This QueryBuilder instance. */ - public function having($having) { + public function having(...$having) { call_user_func_array( [$this->queryBuilder, 'having'], - func_get_args() + $having ); return $this; diff --git a/lib/public/DB/QueryBuilder/IQueryBuilder.php b/lib/public/DB/QueryBuilder/IQueryBuilder.php index e6f4b43c24..aec8e26477 100644 --- a/lib/public/DB/QueryBuilder/IQueryBuilder.php +++ b/lib/public/DB/QueryBuilder/IQueryBuilder.php @@ -682,12 +682,12 @@ interface IQueryBuilder { * Specifies a restriction over the groups of the query. * Replaces any previous having restrictions, if any. * - * @param mixed $having The restriction over the groups. + * @param mixed ...$having The restriction over the groups. * * @return \OCP\DB\QueryBuilder\IQueryBuilder This QueryBuilder instance. * @since 8.2.0 */ - public function having($having); + public function having(...$having); /** * Adds a restriction over the groups of the query, forming a logical