Skip to content

Commit

Permalink
Refactor Form Package: Simplify array access for query and request pa…
Browse files Browse the repository at this point in the history
…rameters
  • Loading branch information
DrissBoumlik committed Nov 11, 2024
1 parent 7a48dda commit cd0068c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Extension/HttpFoundation/HttpFoundationRequestHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function handleRequest(FormInterface $form, mixed $request = null): void
return;
}

$data = $request->query->all()[$name];
$data = $request->query->all($name);
}
} else {
// Mark the form with an error if the uploaded size was too large
Expand All @@ -85,7 +85,7 @@ public function handleRequest(FormInterface $form, mixed $request = null): void
$files = $request->files->all();
} elseif ($request->request->has($name) || $request->files->has($name)) {
$default = $form->getConfig()->getCompound() ? [] : null;
$params = $request->request->all()[$name] ?? $default;
$params = $request->request->all($name) ?? $default;
$files = $request->files->get($name, $default);
} else {
// Don't submit the form if it is not present in the request
Expand Down

0 comments on commit cd0068c

Please sign in to comment.