Skip to content
Snippets Groups Projects
Unverified Commit cb8bef1f authored by Joas Schilling's avatar Joas Schilling
Browse files

Fix iLike() falsely turning escaped % and _ into wildcards

parent 9e2ced60
No related branches found
No related tags found
No related merge requests found
...@@ -189,8 +189,6 @@ class OCIExpressionBuilder extends ExpressionBuilder { ...@@ -189,8 +189,6 @@ class OCIExpressionBuilder extends ExpressionBuilder {
* @inheritdoc * @inheritdoc
*/ */
public function iLike($x, $y, $type = null) { public function iLike($x, $y, $type = null) {
$x = $this->helper->quoteColumnName($x); return $this->like($this->functionBuilder->lower($x), $this->functionBuilder->lower($y));
$y = $this->helper->quoteColumnName($y);
return new QueryFunction('REGEXP_LIKE(' . $x . ', \'^\' || REPLACE(REPLACE(' . $y . ', \'%\', \'.*\'), \'_\', \'.\') || \'$\', \'i\')');
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment