Commit fc02caec authored by Tim Plunkett's avatar Tim Plunkett
Browse files

Issue #1282566 by juampy, tim.plunkett: Don't check the item weight when...

Issue #1282566 by juampy, tim.plunkett: Don't check the item weight when editing the widget default value.
parent 3d82aba6
......@@ -1251,7 +1251,7 @@ function field_collection_field_widget_embed_validate($element, &$form_state, $c
field_attach_submit('field_collection_item', $field_collection_item, $element, $form_state);
// Set the _weight if it is a multiple field.
if ($field['cardinality'] > 1 || $field['cardinality'] == FIELD_CARDINALITY_UNLIMITED) {
if (isset($element['_weight']) && ($field['cardinality'] > 1 || $field['cardinality'] == FIELD_CARDINALITY_UNLIMITED)) {
$item['_weight'] = $element['_weight']['#value'];
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment