Skip to content

Commit aa73858

Browse files
committed
minor #60285 [Form][HttpFoundation] Fix overwriting an array element (wkania)
This PR was merged into the 6.4 branch. Discussion ---------- [Form][HttpFoundation] Fix overwriting an array element | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | | License | MIT `empty_data` is overwritten in the line 51-52 `$server['SCRIPT_NAME']` is assigned twice with the same value: line 609 and 610 line 734 and 737 Commits ------- d49a058 Fix overwriting an array element
2 parents 1efd768 + d49a058 commit aa73858

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
lines changed

src/Symfony/Component/Form/Extension/Core/Type/WeekType.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ public function buildForm(FormBuilderInterface $builder, array $options)
4242
} else {
4343
$yearOptions = $weekOptions = [
4444
'error_bubbling' => true,
45-
'empty_data' => '',
4645
];
4746
// when the form is compound the entries of the array are ignored in favor of children data
4847
// so we need to handle the cascade setting here

src/Symfony/Component/HttpFoundation/Tests/RequestTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,6 @@ public function testGetUri()
604604

605605
$server['REDIRECT_QUERY_STRING'] = 'query=string';
606606
$server['REDIRECT_URL'] = '/path/info';
607-
$server['SCRIPT_NAME'] = '/index.php';
608607
$server['QUERY_STRING'] = 'query=string';
609608
$server['REQUEST_URI'] = '/path/info?toto=test&1=1';
610609
$server['SCRIPT_NAME'] = '/index.php';
@@ -731,7 +730,6 @@ public function testGetUriForPath()
731730

732731
$server['REDIRECT_QUERY_STRING'] = 'query=string';
733732
$server['REDIRECT_URL'] = '/path/info';
734-
$server['SCRIPT_NAME'] = '/index.php';
735733
$server['QUERY_STRING'] = 'query=string';
736734
$server['REQUEST_URI'] = '/path/info?toto=test&1=1';
737735
$server['SCRIPT_NAME'] = '/index.php';

0 commit comments

Comments
 (0)