Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

form_open misbehaves with empty attributes #2560

Closed
igbanam opened this issue Jul 26, 2013 · 6 comments
Closed

form_open misbehaves with empty attributes #2560

igbanam opened this issue Jul 26, 2013 · 6 comments

Comments

@igbanam
Copy link

igbanam commented Jul 26, 2013

Creating a form does not use the post method if an empty array object is passed into the attributes argument.

I looked up the code [line 47 of form_helper.php] and it expects an empty string—I am on the develop branch

Can this be changed to accommodate empty arrays? Or is this how the CodeIgniter team wants it?

Thanks

@narfbg
Copy link
Contributor

narfbg commented Jul 26, 2013

Line 47 of system/helpers/form_helper.php is \t * and is a part of a docblock, I don't know what you're looking at, but it's not an up-to-date code.

@vlakoff
Copy link
Contributor

vlakoff commented Jul 26, 2013

Though, I confirm igravity's issue, form_open() needs some fixes ;-)

@igbanam
Copy link
Author

igbanam commented Jul 26, 2013

Thanks (:

And I will also update my codebase.

Sent from an Asteroid in Space

-----Original Message-----
From: vlakoff notifications@github.com
Date: Fri, 26 Jul 2013 04:57:36
To: EllisLab/CodeIgniterCodeIgniter@noreply.github.com
Reply-To: EllisLab/CodeIgniter reply@reply.github.com
Cc: iGbanam iGravityxigbanam@gmail.com
Subject: Re: [CodeIgniter] form_open misbehaves with empty attributes (#2560)

Though, I confirm igravity's issue, form_open() needs some fixes ;-)


Reply to this email directly or view it on GitHub:
#2560 (comment)

@igbanam
Copy link
Author

igbanam commented Jul 26, 2013

disregard f75c78f, it has a typo

c122511

I also found this may help out with the multipart form_open

@vlakoff
Copy link
Contributor

vlakoff commented Jul 26, 2013

In addition to this issue, I found other things that can be improved, I just need a bit of spare time to make it...

@narfbg narfbg closed this as completed in 122ca9b Jul 26, 2013
@vlakoff
Copy link
Contributor

vlakoff commented Jul 27, 2013

Some issues with current code:

  • error if is_array($attributes) && isset($attributes['method']) because the following stripos($attributes, 'method=') is executed
  • code repetition between form_open() and _attributes_to_string()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants