Commit 1dc5cbb7 authored by generalredneck's avatar generalredneck

[#2077939] Fixed Warning.

parent dc247e95
......@@ -110,14 +110,17 @@ function _views_natural_sort_text_field_to_vns($entity_type, $entity, $field) {
//TODO: add support for Field Language
$entries = array();
foreach(field_get_items($entity_type, $entity, $field_name) as $delta => $row) {
$entries[] = array(
'eid' => $entity->$entity_id_property,
'entity_type' => $entity_type,
'field' => $field_name,
'delta' => $delta,
'content' => $row['value']
);
$field_items = field_get_items($entity_type, $entity, $field_name)
if (!empty($field_items)) {
foreach($field_items as $delta => $row) {
$entries[] = array(
'eid' => $entity->$entity_id_property,
'entity_type' => $entity_type,
'field' => $field_name,
'delta' => $delta,
'content' => $row['value']
);
}
}
return $entries;
}
Markdown is supported
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