fix #2110 다중 파일을 업로드 시 첨부한 파일의 목록을 잘못 처리하는 문제 고침

- `aaa[]`, `bbb[]` 폼 전송 시 `aaa[]`파일이 `bbb[]`에도 동일하게 업로드한 것처럼 잘못 처리하는 문제
This commit is contained in:
bnu 2017-06-26 17:55:08 +09:00 committed by Kijin Sung
parent aee7848706
commit e91c2114ab

View file

@ -1415,10 +1415,14 @@ class Context
}
else
{
for($i = 0, $c = count($tmp_name); $i < $c; $i++)
$files = array();
$count_files = count($tmp_name);
for($i = 0; $i < $count_files; $i++)
{
if($val['size'][$i] > 0)
{
$file = array();
$file['name'] = $val['name'][$i];
$file['type'] = $val['type'][$i];
$file['tmp_name'] = $val['tmp_name'][$i];
@ -1427,7 +1431,10 @@ class Context
$files[] = $file;
}
}
self::set($key, $files, TRUE);
if(count($files))
{
self::set($key, $files, true);
}
}
}
}