diff --git a/lib/private/DB/QueryBuilder/QueryBuilder.php b/lib/private/DB/QueryBuilder/QueryBuilder.php index 4b3fd8449c..a67e379617 100644 --- a/lib/private/DB/QueryBuilder/QueryBuilder.php +++ b/lib/private/DB/QueryBuilder/QueryBuilder.php @@ -729,14 +729,14 @@ class QueryBuilder implements IQueryBuilder { * ->where($or); * * - * @param mixed $predicates The restriction predicates. + * @param mixed ...$predicates The restriction predicates. * * @return \OCP\DB\QueryBuilder\IQueryBuilder This QueryBuilder instance. */ - public function where($predicates) { + public function where(...$predicates) { call_user_func_array( [$this->queryBuilder, 'where'], - func_get_args() + $predicates ); return $this; diff --git a/lib/public/DB/QueryBuilder/IQueryBuilder.php b/lib/public/DB/QueryBuilder/IQueryBuilder.php index 760496064f..3d612b3a3a 100644 --- a/lib/public/DB/QueryBuilder/IQueryBuilder.php +++ b/lib/public/DB/QueryBuilder/IQueryBuilder.php @@ -554,7 +554,7 @@ interface IQueryBuilder { * @return \OCP\DB\QueryBuilder\IQueryBuilder This QueryBuilder instance. * @since 8.2.0 */ - public function where($predicates); + public function where(...$predicates); /** * Adds one or more restrictions to the query results, forming a logical