From 71f0ea38780d2fd90c18bfa2c49fde6f0107906b Mon Sep 17 00:00:00 2001 From: Bastian Lederer Date: Wed, 10 Dec 2025 09:25:50 +0100 Subject: [PATCH] Mark uploaded_file element as required Explictly set the required attribute of the uploaded_file element of BpUploadForm to true. previously the resulting-html element was not required and submitting the form caused null being passed. This is necessary because this class does not extend the Web\Form, and the Zend_Form does not mark the elment as required. --- application/forms/BpUploadForm.php | 1 + 1 file changed, 1 insertion(+) diff --git a/application/forms/BpUploadForm.php b/application/forms/BpUploadForm.php index 9327981..130872c 100644 --- a/application/forms/BpUploadForm.php +++ b/application/forms/BpUploadForm.php @@ -142,6 +142,7 @@ class BpUploadForm extends BpConfigBaseForm /** @var \Zend_Form_Element_File $el */ $el = $this->getElement('uploaded_file'); $el->setValueDisabled(true); + $el->setAttrib('required', true); $this->setSubmitLabel( $this->translate('Next')