Skip to content

Commit bac92bb

Browse files
authored
Merge pull request #23954 from nextcloud/backport/23943/stable20
[stable20] Fix iLike() falsely turning escaped % and _ into wildcards
2 parents a5c6abc + 3a7e2fb commit bac92bb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,6 @@ public function like($x, $y, $type = null) {
189189
* @inheritdoc
190190
*/
191191
public function iLike($x, $y, $type = null) {
192-
$x = $this->helper->quoteColumnName($x);
193-
$y = $this->helper->quoteColumnName($y);
194-
return new QueryFunction('REGEXP_LIKE(' . $x . ', \'^\' || REPLACE(REPLACE(' . $y . ', \'%\', \'.*\'), \'_\', \'.\') || \'$\', \'i\')');
192+
return $this->like($this->functionBuilder->lower($x), $this->functionBuilder->lower($y));
195193
}
196194
}

0 commit comments

Comments
 (0)