8000 [Form] Missing Data Handling (checkbox edge cases) by filiplikavcan · Pull Request #45081 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Form] Missing Data Handling (checkbox edge cases) #45081

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

Open
wants to merge 13 commits into
base: 7.4
Choose a base branch
from
Prev Previous commit
Next Next commit
Add original logic (has/all) back
  • Loading branch information
filiplikavcan committed Oct 4, 2022
commit 663984ed061d7d0611f2cea006bc8417ec47b61c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,14 @@ public function handleRequest(FormInterface $form, mixed $request = null)
} else {
$missingData = $this->missingDataHandler->missingData;

if ($missingData === $data = $this->missingDataHandler->handle($form, $request->query->get($name) ?? $missingData)) {
if ($request->query->has($name)) {
$data = $request->query->all()[$name];
}
else {
$data = $missingData;
}

if ($missingData === $data = $this->missingDataHandler->handle($form, $data)) {
// Don't submit GET requests if the form's name does not exist
// in the request
return;
Expand Down
0