{"issue":{"milestone":null,"user":{"id":557589,"login":"Eclarian","url":"https://api.github.com/users/Eclarian","avatar_url":"https://secure.gravatar.com/avatar/957032d1a42d427c87665b9185fa1356?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"957032d1a42d427c87665b9185fa1356"},"created_at":"2011-12-19T00:38:43Z","title":"Make form open properly when empty array of parameters is passed","updated_at":"2011-12-19T12:13:06Z","labels":[],"state":"closed","id":2595934,"html_url":"https://github.com/EllisLab/CodeIgniter/issues/795","closed_at":"2011-12-19T05:24:26Z","pull_request":{"patch_url":"https://github.com/EllisLab/CodeIgniter/pull/795.patch","html_url":"https://github.com/EllisLab/CodeIgniter/pull/795","diff_url":"https://github.com/EllisLab/CodeIgniter/pull/795.diff"},"body":"Even if $attributes passed to form_open() or form_open_multipart() is an empty array, it should still add the default method as post along with the default accept-charset.\r\n\r\nI didn't do anything for the plain string attributes check as the form_open method already checks for the empty string and defaults the method to post. However, this does make one of these two blocks of code redundant.\r\n\r\n\r\n\t\t// Within form_open()\r\n\t\t// approximately line 59\r\n\t\tif ($attributes == '')\r\n\t\t{\r\n\t\t\t$attributes = 'method=\"post\"';\r\n\t\t}\r\n\t\t\r\n\t\t// Within _attributes_to_string() \r\n\t\t// approximately line 985\r\n\t\tif ($formtag == TRUE AND strpos($attributes, 'method=') === FALSE)\r\n\t\t{\r\n\t\t\t$attributes .= ' method=\"post\"';\r\n\t\t}\r\n\r\nI think that the section within form_open() should be removed since it is already being called by form_open_multipart(), making the portion located within _attributes_to_string() required for that function but not ever for form_open()","number":795,"url":"https://api.github.com/repos/EllisLab/CodeIgniter/issues/795","comments":1,"assignee":null},"comment":{"user":{"id":67381,"login":"philsturgeon","url":"https://api.github.com/users/philsturgeon","avatar_url":"https://secure.gravatar.com/avatar/14df293d6c5cd6f05996dfc606a6a951?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"14df293d6c5cd6f05996dfc606a6a951"},"created_at":"2011-12-19T12:13:06Z","updated_at":"2011-12-19T12:13:06Z","id":3202438,"body":"You talked about removing a section but didnt remove anything?","url":"https://api.github.com/repos/EllisLab/CodeIgniter/issues/comments/3202438"},"action":"created"}