Skip to content

Commit

Permalink
Fixed file and data merging when validating nested multipart properties.
Browse files Browse the repository at this point in the history
  • Loading branch information
leobedrosian committed Sep 23, 2024
1 parent a665e22 commit 9f4ed01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PSR7/Validators/BodyValidator/MultipartValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

use function array_diff_assoc;
use function array_map;
use function array_replace;
use function array_replace_recursive;
use function array_shift;
use function explode;
use function in_array;
Expand Down Expand Up @@ -291,7 +291,7 @@ private function validateServerRequestMultipart(

$files = $this->normalizeFiles($message->getUploadedFiles());

$body = array_replace($body, $files);
$body = array_replace_recursive($body, $files);

$validator = new SchemaValidator($this->detectValidationStrategy($message));
try {
Expand Down

0 comments on commit 9f4ed01

Please sign in to comment.