We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3113f3f commit 94253e8Copy full SHA for 94253e8
src/Symfony/Component/Form/Form.php
@@ -748,7 +748,7 @@ public function isEmpty()
748
749
return FormUtil::isEmpty($this->modelData) ||
750
// arrays, countables
751
- 0 === count($this->modelData) ||
+ ((is_array($this->modelData) || $this->modelData instanceof \Countable) && 0 === count($this->modelData)) ||
752
// traversables that are not countable
753
($this->modelData instanceof \Traversable && 0 === iterator_count($this->modelData));
754
}
0 commit comments