{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/5906","labels_url":"https://api.github.com/repos/symfony/symfony/issues/5906/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/5906/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/5906/events","html_url":"https://github.com/symfony/symfony/issues/5906","id":8087497,"number":5906,"title":"[3.0] [Form] Setting \"empty_data\" to \"\" still results in NULL","user":{"login":"webmozart","id":176399,"avatar_url":"https://avatars.githubusercontent.com/u/176399?v=3","gravatar_id":"","url":"https://api.github.com/users/webmozart","html_url":"https://github.com/webmozart","followers_url":"https://api.github.com/users/webmozart/followers","following_url":"https://api.github.com/users/webmozart/following{/other_user}","gists_url":"https://api.github.com/users/webmozart/gists{/gist_id}","starred_url":"https://api.github.com/users/webmozart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webmozart/subscriptions","organizations_url":"https://api.github.com/users/webmozart/orgs","repos_url":"https://api.github.com/users/webmozart/repos","events_url":"https://api.github.com/users/webmozart/events{/privacy}","received_events_url":"https://api.github.com/users/webmozart/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/symfony/symfony/labels/Bug","name":"Bug","color":"e10c02"},{"url":"https://api.github.com/repos/symfony/symfony/labels/Form","name":"Form","color":"DDDDDD"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2012-11-04T10:39:37Z","updated_at":"2015-04-30T03:19:51Z","closed_at":null,"body":"When setting the \"empty_data\" option of a text field to `\"\"`, the submitted value is still converted to `null`.\r\n\r\n```php\r\n$form = $formFactory->createBuilder()\r\n    ->add('task', 'text', array(\r\n        'required' => false,\r\n        'empty_data' => '',\r\n    ))\r\n    ->getForm();\r\n\r\nif (isset($_POST[$form->getName()])) {\r\n    $form->bind($_POST[$form->getName()]);\r\n\r\n    var_dump($form->getData());\r\n    die;\r\n}\r\n```\r\n\r\nActual result:\r\n\r\n```\r\narray (size=1)\r\n  'task' => null\r\n```\r\n\r\nExpected result:\r\n\r\n```\r\narray (size=1)\r\n  'task' => \"\"\r\n```"},"comment":{"url":"https://api.github.com/repos/symfony/symfony/issues/comments/97648569","html_url":"https://github.com/symfony/symfony/issues/5906#issuecomment-97648569","issue_url":"https://api.github.com/repos/symfony/symfony/issues/5906","id":97648569,"user":{"login":"abguy","id":11623213,"avatar_url":"https://avatars.githubusercontent.com/u/11623213?v=3","gravatar_id":"","url":"https://api.github.com/users/abguy","html_url":"https://github.com/abguy","followers_url":"https://api.github.com/users/abguy/followers","following_url":"https://api.github.com/users/abguy/following{/other_user}","gists_url":"https://api.github.com/users/abguy/gists{/gist_id}","starred_url":"https://api.github.com/users/abguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abguy/subscriptions","organizations_url":"https://api.github.com/users/abguy/orgs","repos_url":"https://api.github.com/users/abguy/repos","events_url":"https://api.github.com/users/abguy/events{/privacy}","received_events_url":"https://api.github.com/users/abguy/received_events","type":"User","site_admin":false},"created_at":"2015-04-30T03:19:51Z","updated_at":"2015-04-30T03:19:51Z","body":"+1"}}