diff --git a/src/Symfony/Component/Form/Form.php b/src/Symfony/Component/Form/Form.php index 3e8d632d93..63ef109e67 100644 --- a/src/Symfony/Component/Form/Form.php +++ b/src/Symfony/Component/Form/Form.php @@ -140,9 +140,9 @@ class Form implements \IteratorAggregate, FormInterface private $lockSetData = false; /** - * @var string|int|null + * @var string */ - private $name; + private $name = ''; /** * @var bool Whether the form inherits its underlying data from its parent @@ -211,7 +211,7 @@ class Form implements \IteratorAggregate, FormInterface return $this->propertyPath; } - if (null === $this->name || '' === $this->name) { + if ('' === $this->name) { return null; }