From 06d3f94df844456f31712c3cb335fd4e836c6915 Mon Sep 17 00:00:00 2001 From: rpagliuca Date: Wed, 12 Feb 2014 18:52:20 -0200 Subject: [PATCH] Typeo in example of dynamic_form_modification.rst There was a typeo in one of the example blocks of dynamic_form_modification.rst. For the product to be new, $product->getId() should be equal to NULL, and not different. --- cookbook/form/dynamic_form_modification.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/form/dynamic_form_modification.rst b/cookbook/form/dynamic_form_modification.rst index c5255707a01..5811ca6cc1c 100644 --- a/cookbook/form/dynamic_form_modification.rst +++ b/cookbook/form/dynamic_form_modification.rst @@ -123,7 +123,7 @@ the event listener might look like the following:: // check if the Product object is "new" // If no data is passed to the form, the data is "null". // This should be considered a new "Product" - if (!$product || null !== $product->getId()) { + if (!$product || null === $product->getId()) { $form->add('name', 'text'); } });