8000 extraData error by d3vpunk · Pull Request #7 · symfony/form · GitHub
[go: up one dir, main page]

Skip to content

extraData error #7

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
extraData error
isset() is not correct here: If you submit a form with the value NULL (for example: firstname: null) the Form class handles firstname as extraData and the form has errors although firstname is defined in a formtype
  • Loading branch information
d3vpunk committed Feb 17, 2014
commit 500a963c40ca0afc540be153c6e6ccd36b8c753b
2 changes: 1 addition & 1 deletion Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ public function submit($submittedData, $clearMissing = true)
}

foreach ($this->children as $name => $child) {
if (isset($submittedData[$name]) || $clearMissing) {
if (array_key_exists($name, $submittedData) || $clearMissing) {
$child->submit(isset($submittedData[$name]) ? $submittedData[$name] : null, $clearMissing);
unset($submittedData[$name]);

Expand Down
0