diff --git a/framework/helpers/BaseHtml.php b/framework/helpers/BaseHtml.php index 4f71b99..735950a 100644 --- a/framework/helpers/BaseHtml.php +++ b/framework/helpers/BaseHtml.php @@ -2043,7 +2043,7 @@ class BaseHtml } $attribute = $matches[2]; $value = $model->$attribute; - if ($matches[3] !== '' && $matches[3] !== '[]') { + if ($matches[3] !== '') { foreach (explode('][', trim($matches[3], '[]')) as $id) { if ((is_array($value) || $value instanceof \ArrayAccess) && isset($value[$id])) { $value = $value[$id]; diff --git a/tests/framework/helpers/HtmlTest.php b/tests/framework/helpers/HtmlTest.php index df37057..0c23701 100644 --- a/tests/framework/helpers/HtmlTest.php +++ b/tests/framework/helpers/HtmlTest.php @@ -1026,21 +1026,6 @@ EOD; $noCsrfForm = Html::beginForm('/index.php', 'post', ['csrf' => false, 'id' => 'myform']); $this->assertEquals('