From: Joas Schilling Date: Fri, 6 Nov 2020 12:32:14 +0000 (+0100) Subject: Cast bool things to numbers as that is how they are stored in the database X-Git-Tag: v20.0.2RC1~26^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=990bb0700239c8dab1000f21ac05d186fc4acede;p=nextcloud-server.git Cast bool things to numbers as that is how they are stored in the database Signed-off-by: Joas Schilling --- diff --git a/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php b/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php index e8e436ba5bd..c3715074685 100644 --- a/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php +++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php @@ -170,7 +170,7 @@ class OCIExpressionBuilder extends ExpressionBuilder { $column = $this->helper->quoteColumnName($column); return new QueryFunction('to_char(' . $column . ')'); } - if ($type === IQueryBuilder::PARAM_INT) { + if ($type === IQueryBuilder::PARAM_INT || $type === IQueryBuilder::PARAM_BOOL) { $column = $this->helper->quoteColumnName($column); return new QueryFunction('to_number(to_char(' . $column . '))'); }