silverstripe/silverstripe-framework — pull request #3482 by UndefinedOffset (2014-09-10 14:24:45+00:00)
Title: BUG: Fixed issue where FormField::getAttributesHTML() params from template are ignored

Because of how the template parser works attributes passed into FormField::getAttributesHTML() from templates were ignored. This causes form fields like CreditCardField to have duplicate html attributes, in the case of the name attribute this causes a php error when the field is validated.

I'm not sure I like this fix but its the only way I know of to get around the compatibility issue if FormField::getAttributesHTML() is renamed to FormField::AttributesHTML(). If you simply call FormField::getAttributesHTML() from the added method passing in an array it breaks the attributes so using call_user_func_array() seems to be the only way short of duplicating code.