mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
fix #2110 다중 파일을 업로드 시 첨부한 파일의 목록을 잘못 처리하는 문제 고침
- `aaa[]`, `bbb[]` 폼 전송 시 `aaa[]`파일이 `bbb[]`에도 동일하게 업로드한 것처럼 잘못 처리하는 문제
This commit is contained in:
parent
aee7848706
commit
e91c2114ab
1 changed files with 9 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue