diff --git a/CHANGELOG b/CHANGELOG index f04e0270b3..34212fcfdc 100755 --- a/CHANGELOG +++ b/CHANGELOG @@ -21,6 +21,7 @@ Version 1.1.11 work in progress - Bug: Fixed CMenu::isItemActive() to work properly when there is a hash in the item's url (SlKelevro) - Bug: Added missing return statement to CAuthItem->revoke() (mdomba) - Bug #697: Fixed WSDLGenerator now generating proper namespace for certain complexTypes (BBoom) +- Bug: CHtml::resolveValue() ignoring of array elements accessor at the beginning of the $attribute argument now works properly (resurtm) - Enh #120: Added ability to set cookies in an object based style without specifying the cookie-name twice (suralc) - Enh #136: Added ability to select database connection in Gii model generator (samdark) - Enh #165: Allow CCacheDependency to be reusable across multiple cache calls (phpnode) diff --git a/framework/web/helpers/CHtml.php b/framework/web/helpers/CHtml.php index f0a267ff98..a65f7aa5cf 100644 --- a/framework/web/helpers/CHtml.php +++ b/framework/web/helpers/CHtml.php @@ -2123,9 +2123,9 @@ public static function resolveValue($model,$attribute) { if(($pos=strpos($attribute,'['))!==false) { - if($pos===0) // [a]name[b][c], should ignore [a] + if($pos===0) // [a]name[b][c], should ignore [a] { - if(preg_match('/\](\w+)/',$attribute,$matches)) + if(preg_match('/\](.*)/',$attribute,$matches)) $attribute=$matches[1]; if(($pos=strpos($attribute,'['))===false) return $model->$attribute;