Skip to content

Commit a59d68b

Browse files
Update FileType.php
1 parent b54b18c commit a59d68b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Symfony/Component/Form/Extension/Core/Type/FileType.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\Form\Extension\Core\Type;
1313

1414
use Symfony\Component\Form\AbstractType;
15+
use Symfony\Component\Form\Event\PreSubmitEvent;
1516
use Symfony\Component\Form\FileUploadError;
1617
use Symfony\Component\Form\FormBuilderInterface;
1718
use Symfony\Component\Form\FormEvent;
@@ -48,6 +49,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
4849
{
4950
// Ensure that submitted data is always an uploaded file or an array of some
5051
$builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($options) {
52+
/** @var PreSubmitEvent $event */
5153
$form = $event->getForm();
5254
$requestHandler = $form->getConfig()->getRequestHandler();
5355

0 commit comments

Comments
 (0)