From 18a91f02fadf108bfa1a60f258ebacd2f802224b Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Thu, 21 Oct 2021 12:41:01 +0200 Subject: Fix default value for $type in OC\DB\QueryBuilder\ExpressionBuilder\ExpressionBuilder::literal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes PHP errors about passing null to PDO::quote second parameter. We may want to change IExpressionBuilder as well? Signed-off-by: Côme Chilliet --- lib/public/DB/QueryBuilder/IExpressionBuilder.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/public') diff --git a/lib/public/DB/QueryBuilder/IExpressionBuilder.php b/lib/public/DB/QueryBuilder/IExpressionBuilder.php index 77701240d51..4758fd06208 100644 --- a/lib/public/DB/QueryBuilder/IExpressionBuilder.php +++ b/lib/public/DB/QueryBuilder/IExpressionBuilder.php @@ -418,7 +418,7 @@ interface IExpressionBuilder { * Quotes a given input parameter. * * @param mixed $input The parameter to be quoted. - * @param mixed|null $type One of the IQueryBuilder::PARAM_* constants + * @param int $type One of the IQueryBuilder::PARAM_* constants * * @return ILiteral * @since 8.2.0 @@ -426,7 +426,7 @@ interface IExpressionBuilder { * @psalm-taint-sink sql $input * @psalm-taint-sink sql $type */ - public function literal($input, $type = null): ILiteral; + public function literal($input, $type = IQueryBuilder::PARAM_STR): ILiteral; /** * Returns a IQueryFunction that casts the column to the given type -- cgit v1.2.3