Skip to content

Commit c1051d5

Browse files
committed
fixed CS
1 parent e660bc9 commit c1051d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy