Closed
Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | no |
RFC? | no |
Symfony version | 2.7.38, 3.3.13 |
In symfony 2.7.38 / 3.3.13, the following warning occurred with FileType.
ContextErrorException in FileType.php line 43:
Warning: Invalid argument supplied for foreach()
It is reproduced with the following code. (I am using Silex)
$builder = $app['form.factory']->createBuilder();
$builder->add('file', FileType::class, [
'multiple' => true,
]);
$form->submit([]);
$event->getData()
returns null, so it appears to be warned by foreach ().