-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form] [EventListener] fixed sending non array data on preSubmit to ResizeFormListener #13851
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
Conversation
BruceWouaigne
commented
Mar 5, 2015
Q | A |
---|---|
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | #13804 |
License | MIT |
Doc PR | - |
@@ -145,7 +145,7 @@ public function onSubmit(FormEvent $event) | |||
} | |||
|
|||
if (!is_array($data) && !($data instanceof \Traversable && $data instanceof \ArrayAccess)) { | |||
throw new UnexpectedTypeException($data, 'array or (\Traversable and \ArrayAccess)'); | |||
$data = array(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be done in the preSubmit
method instead ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed
Would seem more natural to me if |
And it should be merged in 2.3 |
|
Thanks for working on this @BruceWouaigne! Looks good to me. |
Awesome! Thanks :) |
The other fixes of this kind have been merged into 2.3. So merging this into 2.8 seems wrong to me. |
…tener (BruceWouaigne) This PR was merged into the 2.3 branch. Discussion ---------- [Form] fixed sending non array data on submit to ResizeListener | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #13804, #13851 | License | MIT | Doc PR | I agree with @Tobion that #13851 is a bug fix and therefore should be applied on the `2.3` branch too. Commits ------- 0f185c9 [Form] [EventListener] fixed sending non array data on submit to ResizeListener