Commit 322e9e23 by Sergey Gonimar

Fix BETWEEN and NOT BETWEEN conditions.

``` PHP Notice – yii\base\ErrorException Undefined offset: 3 in .../yiisoft/yii2/db/QueryTrait.php at line 269 ```
parent f210ec82
......@@ -266,7 +266,7 @@ trait QueryTrait
case 'BETWEEN':
case 'NOT BETWEEN':
if (array_key_exists(1, $condition) && array_key_exists(2, $condition)) {
if ($this->isEmpty($condition[2]) || $this->isEmpty($condition[3])) {
if ($this->isEmpty($condition[1]) || $this->isEmpty($condition[2])) {
return [];
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment