From f7d31d58c2013e56c28eb788b53584167cbc9557 Mon Sep 17 00:00:00 2001 From: Giraffaman Date: Mon, 26 Feb 2024 23:46:04 +0100 Subject: [PATCH] make sure we always render at least one file input --- ext/upload/theme.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/upload/theme.php b/ext/upload/theme.php index 839880d9c..daaeed541 100644 --- a/ext/upload/theme.php +++ b/ext/upload/theme.php @@ -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(