mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-25 19:20:29 +08:00
Fixes #5252: Null values are not properly handled by RangeValidator
This commit is contained in:
@@ -4,6 +4,7 @@ Yii Framework 2 Change Log
|
||||
2.0.0 under development
|
||||
-----------------------
|
||||
|
||||
- Bug #5252: Null values are not properly handled by `RangeValidator` (githubjeka, qiangxue)
|
||||
- Bug #5260: `yii\i18n\Formatter::decimalSeparator` and `yii\i18n\Formatter::thousandSeparator` where not configurable when intl is not installed (execut, cebe)
|
||||
- Bug #5314: Fixed typo in the implementation of `yii\web\Session::getHasSessionId()` (qiangxue)
|
||||
- Bug: Date and time formatting now assumes UTC as the timezone for input dates unless a timezone is explicitly given (cebe)
|
||||
|
||||
@@ -66,7 +66,7 @@ class RangeValidator extends Validator
|
||||
|
||||
$in = true;
|
||||
|
||||
foreach ((array)$value as $v) {
|
||||
foreach ((is_array($value) ? $value : [$value]) as $v) {
|
||||
if (!in_array($v, $this->range, $this->strict)) {
|
||||
$in = false;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user