Fixes #5252: Null values are not properly handled by RangeValidator

This commit is contained in:
Qiang Xue
2014-10-03 09:30:26 -04:00
parent d4ceeb2d26
commit d6b797e236
3 changed files with 13 additions and 1 deletions

View File

@@ -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)

View File

@@ -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;