diff --git a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php index 7db56739a..4848e4577 100644 --- a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php @@ -3914,24 +3914,24 @@ class FormHelperTest extends CakeTestCase { ); $this->assertTags($result, $expected); - $result = $this->Form->radio('Model.field', array('option A', 'option B'), array('fieldset' => 'classy-stuff')); - $expected = array( - 'fieldset' => array('class' => 'classy-stuff'), - 'legend' => array(), - 'Field', - '/legend', - 'input' => array('type' => 'hidden', 'name' => 'data[Model][field]', 'value' => '', 'id' => 'ModelField_'), - array('input' => array('type' => 'radio', 'name' => 'data[Model][field]', 'value' => '0', 'id' => 'ModelField0')), - array('label' => array('for' => 'ModelField0')), - 'option A', - '/label', - array('input' => array('type' => 'radio', 'name' => 'data[Model][field]', 'value' => '1', 'id' => 'ModelField1')), - array('label' => array('for' => 'ModelField1')), - 'option B', - '/label', - '/fieldset' - ); - $this->assertTags($result, $expected); + $result = $this->Form->radio('Model.field', array('option A', 'option B'), array('fieldset' => 'classy-stuff')); + $expected = array( + 'fieldset' => array('class' => 'classy-stuff'), + 'legend' => array(), + 'Field', + '/legend', + 'input' => array('type' => 'hidden', 'name' => 'data[Model][field]', 'value' => '', 'id' => 'ModelField_'), + array('input' => array('type' => 'radio', 'name' => 'data[Model][field]', 'value' => '0', 'id' => 'ModelField0')), + array('label' => array('for' => 'ModelField0')), + 'option A', + '/label', + array('input' => array('type' => 'radio', 'name' => 'data[Model][field]', 'value' => '1', 'id' => 'ModelField1')), + array('label' => array('for' => 'ModelField1')), + 'option B', + '/label', + '/fieldset' + ); + $this->assertTags($result, $expected); $result = $this->Form->radio( 'Employee.gender', diff --git a/lib/Cake/View/Helper/FormHelper.php b/lib/Cake/View/Helper/FormHelper.php index 4710b8977..9625fc09f 100644 --- a/lib/Cake/View/Helper/FormHelper.php +++ b/lib/Cake/View/Helper/FormHelper.php @@ -975,11 +975,11 @@ class FormHelper extends AppHelper { $out .= $this->input($name, $options); } - if (is_string($fieldset)) { - $fieldsetClass = array('class' => $fieldset); - } else { - $fieldsetClass = ''; - } + if (is_string($fieldset)) { + $fieldsetClass = array('class' => $fieldset); + } else { + $fieldsetClass = ''; + } if ($fieldset) { if ($legend) {