8000 [Form] Fix submitting checkboxes and radios with PATCH method by HeahDude · Pull Request #17771 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Form] Fix submitting checkboxes and radios with PATCH method #17771

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 4 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
fix tests
  • Loading branch information
HeahDude committed Dec 3, 2016
commit e7576a6462379573a348015ad5820b772e8f606d
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function configureOptions(OptionsResolver $resolver)

$resolver->setNormalizer('force_submit', function (Options $options) {
// If pre set data is true, we need to ensure that $emptyData will be submitted
return (bool) $options['data'];
return isset($options['data']) && (bool) $options['data'];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about

return !empty($options['data']);

instead?

});
}

Expand Down
0