symfony/symfony — Issue #2547: [Form][Bug] Using radio elements results in an error when binding the request to the form.
Author: Spea
Created: 2011-11-02 17:32:33+00:00
State: open

When adding radio elements to the form and the requets is being bind to the form, the following error appears:

***Warning: array_replace_recursive(): Argument #1 is not an array in /.../vendor/symfony/src/Symfony/Component/Form/Form.php line 583***

Here is an example code:

```php
createFormBuilder()
->add('test', 'text')
->add('test2', 'radio')
->add('test3', 'radio')
->getForm();

if ($request->getMethod() == 'POST') {
$form->bindRequest($request);
}

return $this->render('MyBundle:Test:form.html.twig', array(
'form' => $form->createView(),
));
}
}
```