Skip to content

Commit 5c9c00f

Browse files
authored
Fix RequestFactory for multipart requests
1 parent e2be436 commit 5c9c00f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/RequestFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ public function create() : Request
3232
$contentType = $this->request->headers->get('Content-Type');
3333

3434
if (\is_string($contentType) && \str_starts_with($contentType, 'multipart/form-data')) {
35-
if ($method === 'POST' && \array_key_exists('operations', $this->request->toArray())) {
36-
return $this->applyJsonFactory(Json::fromString($this->request->get('operations')));
35+
if ($method === 'POST' && $this->request->getPayload()->has('operations')) {
36+
return $this->applyJsonFactory(Json::fromString($this->request->getPayload()->get('operations')));
3737
}
3838

3939
throw new InvalidMultipartRequest();

0 commit comments

Comments
 (0)