Skip to content

Commit 7c78e6e

Browse files
committed
Updated filenames
1 parent bfc4d52 commit 7c78e6e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Http/Request.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -282,19 +282,19 @@ private function addFile(array &$files, string $fieldName, string $filename, str
282282
'size' => filesize($tmpPath),
283283
];
284284

285-
$matches = preg_split('|(\[[^\]]*\])|', $fieldName, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
286-
$count = count($matches);
285+
$parts = preg_split('|(\[[^\]]*\])|', $fieldName, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
286+
$count = count($parts);
287287
if (1 === $count) {
288288
$files[$fieldName] = $data;
289289
} else {
290290
$current = &$files;
291-
foreach ($matches as $i => $match) {
292-
if ($match === '[]') {
291+
foreach ($parts as $i => $part) {
292+
if ($part === '[]') {
293293
$current[] = $data;
294294
continue;
295295
}
296296

297-
$trimmedMatch = trim($match, '[]');
297+
$trimmedMatch = trim($part, '[]');
298298
if ($i === $count -1) {
299299
$current[$trimmedMatch] = $data;
300300
} else {

0 commit comments

Comments
 (0)