From 0ace068a52002f0712854af9af3b9ef69f3944e9 Mon Sep 17 00:00:00 2001 From: Bernhard Schussek Date: Fri, 25 Mar 2011 10:55:05 +0100 Subject: [PATCH] [Form] PropertyPathMapper now only maps if the form data is synchronized to avoid duplicate form errors ('invalid'+'NotNull', for example) --- src/Symfony/Component/Form/DataMapper/PropertyPathMapper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Form/DataMapper/PropertyPathMapper.php b/src/Symfony/Component/Form/DataMapper/PropertyPathMapper.php index 87046bb807..e78b27a05d 100644 --- a/src/Symfony/Component/Form/DataMapper/PropertyPathMapper.php +++ b/src/Symfony/Component/Form/DataMapper/PropertyPathMapper.php @@ -91,7 +91,7 @@ class PropertyPathMapper implements DataMapperInterface public function mapFormToData(FormInterface $form, &$data) { - if ($form->getAttribute('property_path') !== null) { + if ($form->getAttribute('property_path') !== null && $form->isSynchronized()) { $propertyPath = $form->getAttribute('property_path'); // If the data is identical to the value in $data, we are