diff --git a/field_collection_uuid/field_collection_uuid.module b/field_collection_uuid/field_collection_uuid.module index 7dcc571..2aadb86 100644 --- a/field_collection_uuid/field_collection_uuid.module +++ b/field_collection_uuid/field_collection_uuid.module @@ -41,9 +41,10 @@ function field_collection_field_uuid_load($entity_type, $entity, $field, $instan function field_collection_field_uuid_presave($entity_type, $entity, $field, $instance, $langcode, &$items) { entity_property_uuid_to_id($items, 'field_collection_item', 'value'); // Update the revision_ids of the field to match the head revisions of the entities. - $entity_ids = array_map(function($item) { - return $item['value']; - }, $items); + $entity_ids = array(); + foreach ($items as $item) { + $entity_ids[] = $item['value']; + } $field_collections = entity_load("field_collection_item", $entity_ids); foreach ($items as &$item) {