We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 95d4ce9 + a593098 commit 01c2a0eCopy full SHA for 01c2a0e
Form/EventListener/SingleUploadSubscriber.php
@@ -33,8 +33,14 @@ public function preSetData(FormEvent $event)
33
{
34
$form = $event->getForm();
35
$obj = $event->getData();
36
+
37
+ //can be null if prototype in collection
38
+ if($obj == null) {
39
+ return;
40
+ }
41
42
foreach ($form->all() as $child) {
- if ($child->getConfig()->getType()->getName() === 'afe_single_upload') {
43
+ if ($this->isFieldSingleUpload($child->getConfig()->getType())) {
44
$name = $child->getName();
45
$getterName = 'get'.ucfirst($name);
46
$this->files[$name] = $obj->$getterName();
0 commit comments