Skip to content

Commit 2f22d7e

Browse files
committed
use array_replace_recursive instead of array_merge_recursive
1 parent 710a440 commit 2f22d7e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Symfony/Component/BrowserKit/HttpBrowser.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,7 @@ private function getBodyAndExtraHeaders(Request $request, array $headers): array
8282
$fields = $request->getParameters();
8383

8484
if ($uploadedFiles = $this->getUploadedFiles($request->getFiles())) {
85-
if (\count($fields) !== \count($fields, \COUNT_RECURSIVE)) {
86-
$part = new FormDataPart(array_merge_recursive($fields, $uploadedFiles));
87-
} else {
88-
$part = new FormDataPart(array_merge($fields, $uploadedFiles));
89-
}
85+
$part = new FormDataPart(array_replace_recursive($fields, $uploadedFiles));
9086

9187
return [$part->bodyToIterable(), $part->getPreparedHeaders()->toArray()];
9288
}

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