|
@@ -503,6 +503,11 @@ class TripalEntityController extends EntityAPIController {
|
|
|
$field = field_info_field($field_name);
|
|
|
$field_id = $field['id'];
|
|
|
|
|
|
+ // Add this field to the entity with default value.
|
|
|
+ if (!isset($queried_entities[$id]->$field_name)) {
|
|
|
+ $queried_entities[$id]->$field_name = array();
|
|
|
+ }
|
|
|
+
|
|
|
// Options used for the field_attach_load function.
|
|
|
$options = array();
|
|
|
$options['field_id'] = $field['id'];
|
|
@@ -516,7 +521,7 @@ class TripalEntityController extends EntityAPIController {
|
|
|
$cache_data = cache_get($cfid, 'cache_field');
|
|
|
if (!empty($cache_data)) {
|
|
|
$queried_entities[$id]->$field_name = $cache_data->data;
|
|
|
- $queried_entities[$id]->$field_name['#processed'] = TRUE;
|
|
|
+ $queried_entities[$id]->{$field_name}['#processed'] = TRUE;
|
|
|
continue;
|
|
|
}
|
|
|
}
|