Fix #15683: Fix file as array uploading in MultipartFormDataParser (#16950)

This commit is contained in:
Andrew
2018-12-10 11:49:36 +03:00
committed by Alexander Makarov
parent b5be47321b
commit 3221ab0769
3 changed files with 20 additions and 1 deletions

View File

@@ -320,7 +320,8 @@ class MultipartFormDataParser extends BaseObject implements RequestParserInterfa
$namePart = trim($namePart, ']');
if ($namePart === '') {
$current[] = [];
$lastKey = array_pop(array_keys($current));
$keys = array_keys($current);
$lastKey = array_pop($keys);
$current = &$current[$lastKey];
} else {
if (!isset($current[$namePart])) {