Browse Source

Fixes #1591: StringValidator is accessing undefined property

tags/2.0.0-beta
Qiang Xue 11 years ago
parent
commit
a126419e9e
  1. 1
      framework/CHANGELOG.md
  2. 2
      framework/yii/validators/StringValidator.php

1
framework/CHANGELOG.md

@ -9,6 +9,7 @@ Yii Framework 2 Change Log
- Bug #1500: Log messages exported to files are not separated by newlines (omnilight, qiangxue) - Bug #1500: Log messages exported to files are not separated by newlines (omnilight, qiangxue)
- Bug #1509: The SQL for creating Postgres RBAC tables is incorrect (qiangxue) - Bug #1509: The SQL for creating Postgres RBAC tables is incorrect (qiangxue)
- Bug #1545: It was not possible to execute db Query twice, params where missing (cebe) - Bug #1545: It was not possible to execute db Query twice, params where missing (cebe)
- Bug #1591: StringValidator is accessing undefined property (qiangxue)
- Bug: Fixed `Call to a member function registerAssetFiles() on a non-object` in case of wrong `sourcePath` for an asset bundle (samdark) - Bug: Fixed `Call to a member function registerAssetFiles() on a non-object` in case of wrong `sourcePath` for an asset bundle (samdark)
- Bug: Fixed incorrect event name for `yii\jui\Spinner` (samdark) - Bug: Fixed incorrect event name for `yii\jui\Spinner` (samdark)
- Bug: Json::encode() did not handle objects that implement JsonSerializable interface correctly (cebe) - Bug: Json::encode() did not handle objects that implement JsonSerializable interface correctly (cebe)

2
framework/yii/validators/StringValidator.php

@ -174,7 +174,7 @@ class StringValidator extends Validator
$options['is'] = $this->length; $options['is'] = $this->length;
$options['notEqual'] = Html::encode(strtr($this->notEqual, [ $options['notEqual'] = Html::encode(strtr($this->notEqual, [
'{attribute}' => $label, '{attribute}' => $label,
'{length}' => $this->is, '{length}' => $this->length,
])); ]));
} }
if ($this->skipOnEmpty) { if ($this->skipOnEmpty) {

Loading…
Cancel
Save