Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c1051d5

Browse filesBrowse files
committed
fixed CS
1 parent e660bc9 commit c1051d5
Copy full SHA for c1051d5

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class ResizeFormListener implements EventSubscriberInterface
4646
protected $allowDelete;
4747

4848
/**
49-
* @var bool
49+
* @var Boolean
5050
*/
5151
private $deleteEmpty;
5252

@@ -132,7 +132,6 @@ public function preSubmit(FormEvent $event)
132132
public function onSubmit(FormEvent $event)
133133
{
134134
$form = $event->getForm();
135-
$previousData = $event->getForm()->getData();
136135
$data = $event->getData();
137136

138137
// At this point, $data is an array or an array-like object that already contains the
@@ -148,6 +147,7 @@ public function onSubmit(FormEvent $event)
148147
}
149148

150149
if ($this->deleteEmpty) {
150+
$previousData = $event->getForm()->getData();
151151
foreach ($form as $name => $child) {
152152
$isNew = !isset($previousData[$name]);
153153

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.