Skip to content

Commit 0da5901

Browse files
Use the get method instead of using the array
1 parent 3e8fcc3 commit 0da5901

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controller/upload_file.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ Finally, you need to update the code of the controller that handles the form::
143143

144144
if ($form->isSubmitted() && $form->isValid()) {
145145
/** @var UploadedFile $brochureFile */
146-
$brochureFile = $form['brochure']->getData();
146+
$brochureFile = $form->get('brochure')->getData();
147147

148148
// this condition is needed because the 'brochure' field is not required
149149
// so the PDF file must be processed only when a file is uploaded

0 commit comments

Comments
 (0)