Fixes #1591: StringValidator is accessing undefined property

This commit is contained in:
Qiang Xue
2013-12-21 15:37:49 -05:00
parent 594fd2daed
commit a126419e9e
2 changed files with 2 additions and 1 deletions

View File

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

View File

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