From 07d14e5ff2647ab197ad711760ddb95e69278edd Mon Sep 17 00:00:00 2001 From: Bernhard Schussek Date: Thu, 22 Aug 2013 14:19:04 +0200 Subject: [PATCH] [Form] Removed exception in Button::setData(): setData() is now always called for all elements in the form tree during the initialization of the tree --- src/Symfony/Component/Form/Button.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Form/Button.php b/src/Symfony/Component/Form/Button.php index 6e12ba163c..aecbabaebe 100644 --- a/src/Symfony/Component/Form/Button.php +++ b/src/Symfony/Component/Form/Button.php @@ -200,7 +200,8 @@ class Button implements \IteratorAggregate, FormInterface */ public function setData($modelData) { - throw new BadMethodCallException('Buttons cannot have data.'); + // called during initialization of the form tree + // noop } /**