Skip to content

Commit

Permalink
Merge pull request #4 from cexll/patch-1
Browse files Browse the repository at this point in the history
Update Factory.php
  • Loading branch information
qiqizjl authored Nov 27, 2020
2 parents e1db3aa + 1a599d5 commit 4459162
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,19 @@ private function getRequest(): Request
{
$request = $this->container->get(RequestInterface::class);
//return $this->container->get(RequestInterface::class);
$uploadFiles = $request->getUploadedFiles() ?? [];
$files = [];
foreach ($uploadFiles as $k => $v) {
$files[$k] = $v->toArray();
}
return new Request(
$request->getQueryParams(),
$request->getParsedBody(),
[],
$request->getCookieParams(),
$request->getUploadedFiles(),
is_array($_SERVER) ? $_SERVER : $_SERVER->toArray(),
$files,
$request->getServerParams(),
// is_array($_SERVER) ? $_SERVER : $_SERVER->toArray(),
$request->getBody()->getContents()
);
}
Expand Down

0 comments on commit 4459162

Please sign in to comment.