Skip to content

Commit 4dcd5a4

Browse files
committed
[WIP] Code clarifications
1 parent 5ef1388 commit 4dcd5a4

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationRequestHandler.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,11 @@ public function handleRequest(FormInterface $form, mixed $request = null)
5858
$data = $request->query->all();
5959
} else {
6060
$missingData = $this->missingDataHandler->missingData;
61+
$queryData = $request->query->all()[$name] ?? $missingData;
6162

62-
if ($missingData === $data = $this->missingDataHandler->handle($form, $request->query->all()[$name] ?? $missingData)) {
63+
$data = $this->missingDataHandler->handle($form, $queryData);
64+
65+
if ($missingData === $data) {
6366
// Don't submit GET requests if the form's name does not exist
6467
// in the request
6568
return;

src/Symfony/Component/Form/Tests/AbstractRequestHandlerTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ public function testSubmitCheckboxInCollectionFormWithEmptyData($method)
7878
'method' => $method,
7979
]);
8080

81-
$this->setRequestData($method, [
82-
]);
81+
$this->setRequestData($method, []);
8382

8483
$this->requestHandler->handleRequest($form, $this->request);
8584

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy