-
-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Labels
help wantedstatus:ready for adoptionFeel free to implement this issue.Feel free to implement this issue.type:bugBugBug
Description
What steps will reproduce the problem?
The problem appears only in case parameter contains \
as last symbol. Seems it's in the
yii\sphinx\MatchBuilder::parseParams()
. When changing preg_replace()
to str_replace()
it works but it seems it's not correct to use str_replace()
based on comment:
// $model extends \yii\sphinx\ActiveRecord
$value = '543524\\';
$data = $model::find()
->match(new MatchExpression(['title' => $value]))
->all();
What's expected?
result set
What do you get instead?
Exception 'yii\db\Exception' with message 'SQLSTATE[42000]: Syntax error or access violation: ...unexpected $end near
Additional info
Q | A |
---|---|
Yii version | 2.0.14.2 |
Yii Sphinx version | 2.0.11 |
Sphinx server version | 2.2.10 |
PHP version | 7.0.31 |
Operating system | ubuntu16.04 |
Metadata
Metadata
Assignees
Labels
help wantedstatus:ready for adoptionFeel free to implement this issue.Feel free to implement this issue.type:bugBugBug