mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-22 01:30:23 +08:00
Method "\yii\mogo\Collection::buildLikeCondition()" fixed to use \MongoRegex.
This commit is contained in:
@@ -907,6 +907,9 @@ class Collection extends Object
|
||||
throw new InvalidParamException("Operator '$operator' requires two operands.");
|
||||
}
|
||||
list($column, $value) = $operands;
|
||||
return [$column => '/' . $value . '/'];
|
||||
if (!($value instanceof \MongoRegex)) {
|
||||
$value = new \MongoRegex($value);
|
||||
}
|
||||
return [$column => $value];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user