Skip to content

Commit

Permalink
Update library/Zend/Form/Element/Collection.php
Browse files Browse the repository at this point in the history
Check if data is available to populate
  • Loading branch information
davidwindell committed Jul 25, 2012
1 parent 3da19a7 commit c8af74e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions library/Zend/Form/Element/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,10 @@ public function populateValues($data)

if ($this->targetElement instanceof FieldsetInterface) {
foreach ($this->byName as $name => $fieldset) {
$fieldset->populateValues($data[$name]);
unset($data[$name]);
if (isset($data[$name])) {
$fieldset->populateValues($data[$name]);
unset($data[$name]);
}
}
} else {
foreach ($this->byName as $name => $element) {
Expand Down

0 comments on commit c8af74e

Please sign in to comment.