mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-06 23:39:02 +01:00
Fix BETWEEN and NOT BETWEEN conditions.
``` PHP Notice – yii\base\ErrorException Undefined offset: 3 in .../yiisoft/yii2/db/QueryTrait.php at line 269 ```
This commit is contained in:
@@ -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 [];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user