Skip to content

Commit 251f686

Browse files
author
Tetsuro Yoshikawa
committed
fix: Add escape to column name when creating like.
1 parent ca018d3 commit 251f686

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

system/Database/BaseBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,7 @@ protected function _like($field, string $match = '', string $type = 'AND ', stri
12501250
$bind = $this->setBind($k, "%$v%", $escape);
12511251
}
12521252

1253-
$like_statement = $this->_like_statement($prefix, $k, $not, $bind, $insensitiveSearch);
1253+
$like_statement = $this->_like_statement($prefix, $this->db->protectIdentifiers($k, false, $escape), $not, $bind, $insensitiveSearch);
12541254

12551255
// some platforms require an escape sequence definition for LIKE wildcards
12561256
if ($escape === true && $this->db->likeEscapeStr !== '')

0 commit comments

Comments
 (0)