Skip to content

Commit 6f6900c

Browse files
Merge branch 'cristoforocervino-master' into add_test
2 parents bac993f + 0cace1d commit 6f6900c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/Console/Helper/FormHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function interactUsingNamedForm(
6363

6464
$submittedData = $this->formInteractor->interactWith($form, $this->getHelperSet(), $input, $output);
6565

66-
$form->submit($submittedData);
66+
$form->submit($submittedData, false);
6767

6868
// save the current data
6969
$data = $form->getData();

src/Form/EventListener/UseInputOptionsAsEventDataEventSubscriber.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,15 @@ private function convertInputToSubmittedData(InputInterface $input, FormInterfac
3939
$submittedData = $this->convertInputToSubmittedData($input, $field, $name ?? $form->getName());
4040
} else {
4141
$subName = $name === null ? $childName : $name . '[' . $childName . ']';
42-
$submittedData[$childName] = $this->convertInputToSubmittedData($input, $field, $subName);
42+
$subValue = $this->convertInputToSubmittedData($input, $field, $subName);
43+
if ($subValue !== null) {
44+
$submittedData[$childName] = $subValue;
45+
}
4346
}
4447
}
48+
if (empty($submittedData)) {
49+
$submittedData = null;
50+
}
4551
} else {
4652
$name = $name ?? $form->getName();
4753
if ($input->hasOption($name)) {

0 commit comments

Comments
 (0)