Skip to content

Commit 3d95c89

Browse files
committed
MAGETWO-44555: Exception in Advanced Search if used special symbols
- Moved fix to another class
1 parent 6f44e6e commit 3d95c89

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

lib/internal/Magento/Framework/DB/Helper/Mysql/Fulltext.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ public function getMatchQuery($columns, $expression, $mode = self::FULLTEXT_MODE
6868

6969
$expression = $this->connection->quote($expression);
7070

71-
$expression = str_replace('%', '\\%', $expression);
72-
7371
$condition = self::MATCH . " ({$columns}) " . self::AGAINST . " ({$expression} {$mode})";
7472
return $condition;
7573
}

lib/internal/Magento/Framework/Search/Adapter/Mysql/Query/Builder/Match.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
class Match implements QueryInterface
1717
{
18-
const SPECIAL_CHARACTERS = '-+~/\\<>\'":*$#@()!,.?`=';
18+
const SPECIAL_CHARACTERS = '-+~/\\<>\'":*$#@()!,.?`=%';
1919

2020
const MINIMAL_CHARACTER_LENGTH = 3;
2121

0 commit comments

Comments
 (0)