Skip to content

Commit 81f051b

Browse files
committed
Only try upgrade from GET to POST if it has files
1 parent 5b90042 commit 81f051b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,8 @@ public function getFiles() : array
377377
*/
378378
public function setFiles(array $files) : static
379379
{
380-
$this->tryUpgradeFromGetToPost();
381380
if ($files) {
381+
$this->tryUpgradeFromGetToPost();
382382
$this->setContentType('multipart/form-data');
383383
}
384384
$this->files = $files;

0 commit comments

Comments
 (0)