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>
* 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
*/
- public function literal($input, $type = null): ILiteral {
+ public function literal($input, $type = IQueryBuilder::PARAM_STR): ILiteral {
return new Literal($this->expressionBuilder->literal($input, $type));
}
* 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
* @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