Révision 950416da
Ajouté par Assos Assos il y a plus de 5 ans
drupal7/sites/all/modules/field_collection/field_collection.diff.inc | ||
---|---|---|
25 | 25 |
$view_mode = $context['view_mode']; |
26 | 26 |
$entity = entity_revision_load($entity_type, $item['revision_id']); |
27 | 27 |
|
28 |
if(empty($entity)) { |
|
29 |
return array(); |
|
30 |
} |
|
31 |
|
|
28 | 32 |
$field_context = $context; |
29 | 33 |
$field_context['entity_type'] = $entity_type; |
30 | 34 |
$field_context['bundle'] = $bundle_name; |
... | ... | |
56 | 60 |
|
57 | 61 |
// We provide a loose check on the field access. |
58 | 62 |
if (field_access('view', $field, $entity_type) || field_access('edit', $field, $entity_type)) { |
59 |
$langcode = field_language($entity_type, $entity, $field_name);
|
|
63 |
$langcode = !empty($entity) ? field_language($entity_type, $entity, $field_name) : LANGUAGE_NONE;
|
|
60 | 64 |
$field_context['language'] = $langcode; |
61 | 65 |
$field_context['field'] = $field; |
62 | 66 |
$field_context['instance'] = $instance; |
Formats disponibles : Unified diff
Weekly update of contrib modules