-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form] Empty root form name fails with PUT method #19017
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
Comments
I can confirm. I just lost a few hours on this one today. |
I can't find an easy fix for this, since the Maybe it could acceptable to "remove" the parameter instead of just "getting" it here https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/Request.php#L1215. |
This PR was merged into the 3.4 branch. Discussion ---------- [Form] ignore _method forms in NativeRequestHandler | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #19017 | License | MIT | Doc PR | Commits ------- bc4b091 ignore _method forms in NativeRequestHandler
A form created like this will result in an extra data error
It seems that the RequestHandler will submit the form with all request parameters in case of an empty form name (which includes the hidden _method field)
The submit method of the Form doesn't seem to do any particular check for that special parameter.
A workaround is to set allow_extra_fields to true in the form
The text was updated successfully, but these errors were encountered: