Skip to content

Commit 13f6dcf

Browse files
authored
Merge pull request #24047 from nextcloud/backport/23943/stable18
[stable18] Fix iLike() falsely turning escaped % and _ into wildcards
2 parents 414cd3b + ddc94e4 commit 13f6dcf

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
@@ -186,8 +186,6 @@ public function like($x, $y, $type = null) {
186186
* @inheritdoc
187187
*/
188188
public function iLike($x, $y, $type = null) {
189-
$x = $this->helper->quoteColumnName($x);
190-
$y = $this->helper->quoteColumnName($y);
191-
return new QueryFunction('REGEXP_LIKE(' . $x . ', \'^\' || REPLACE(REPLACE(' . $y . ', \'%\', \'.*\'), \'_\', \'.\') || \'$\', \'i\')');
189+
return $this->like($this->functionBuilder->lower($x), $this->functionBuilder->lower($y));
192190
}
193191
}

0 commit comments

Comments
 (0)