[Form] PropertyPathMapper now only maps if the form data is synchronized to avoid duplicate form errors ('invalid'+'NotNull', for example)

This commit is contained in:
Bernhard Schussek 2011-03-25 10:55:05 +01:00 committed by Bernhard Schussek
parent 6825ea2489
commit 0ace068a52

View File

@ -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