During uploads (including replacements), 'data' should be an array of files, fixes #735

This commit is contained in:
Shish 2020-10-28 17:06:25 +00:00
parent ecafd4e131
commit 7cb18568e3
2 changed files with 2 additions and 2 deletions

View File

@ -332,7 +332,7 @@ class Upload extends Extension
// blank file boxes cause empty uploads, no need for error message
if (!empty($file['name'])) {
$size = sizeof($file['name']);
$size = count($file['name']);
$limit = $config->get_int(UploadConfig::COUNT);
try {
if ($size > $limit) {

View File

@ -152,7 +152,7 @@ class UploadTheme extends Themelet
$upload_list = "
<tr>
<td>File</td>
<td><input name='data' type='file' accept='$accept'></td>
<td><input name='data[]' type='file' accept='$accept'></td>
</tr>
";
if ($tl_enabled) {