Skip to content

Commit

Permalink
make sure we always render at least one file input
Browse files Browse the repository at this point in the history
  • Loading branch information
Giraffaman committed Feb 26, 2024
1 parent 8c707fe commit f7d31d5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ext/upload/theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ protected function build_upload_list(): HTMLElement
# probably not a good idea to show more file inputs than max_file_uploads
if($form_count > $upload_count) {
$form_count = $upload_count;
} elseif ($form_count < 1) {
$form_count = 1;
}
for ($i = 0; $i < $form_count; $i++) {
$upload_list->appendChild(
Expand Down

0 comments on commit f7d31d5

Please sign in to comment.