aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/DB
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2021-10-21 12:41:01 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2021-11-23 09:29:02 +0100
commit18a91f02fadf108bfa1a60f258ebacd2f802224b (patch)
treebf1871c6cbbb83e9c7afbeec8c83d17eb974ccad /lib/public/DB
parent10dfdedcbd71c51fe3bd3532cb91762da3e84a58 (diff)
downloadnextcloud-server-18a91f02fadf108bfa1a60f258ebacd2f802224b.tar.gz
nextcloud-server-18a91f02fadf108bfa1a60f258ebacd2f802224b.zip
Fix default value for $type in OC\DB\QueryBuilder\ExpressionBuilder\ExpressionBuilder::literal
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 <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/public/DB')
-rw-r--r--lib/public/DB/QueryBuilder/IExpressionBuilder.php4
1 files changed, 2 insertions, 2 deletions
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