Commit 75a1825c authored by Robert Rollins's avatar Robert Rollins

Issue #2128731: Index errors on multi-value date fields are fixed.

This is a forward-port of the fix that I just submitted to the 2.x branch.
parent fac2f932
...@@ -242,7 +242,7 @@ class date_ical_plugin_row_ical_entity extends views_plugin_row { ...@@ -242,7 +242,7 @@ class date_ical_plugin_row_ical_entity extends views_plugin_row {
// Only attempt this is the entity actually has this field. // Only attempt this is the entity actually has this field.
$items = field_get_items($this->entity_type, $entity, $location_field_name); $items = field_get_items($this->entity_type, $entity, $location_field_name);
if ($items) { if ($items) {
$location_field = $items[$delta]; $location_field = $items[0];
if ($location_info['type'] == 'node_reference') { if ($location_info['type'] == 'node_reference') {
// Make sure this Node Reference actually references a node. // Make sure this Node Reference actually references a node.
if ($location_field['nid']) { if ($location_field['nid']) {
...@@ -280,7 +280,7 @@ class date_ical_plugin_row_ical_entity extends views_plugin_row { ...@@ -280,7 +280,7 @@ class date_ical_plugin_row_ical_entity extends views_plugin_row {
$items = field_get_items($this->entity_type, $entity, $summary_field_name); $items = field_get_items($this->entity_type, $entity, $summary_field_name);
$summary = ''; $summary = '';
if ($items) { if ($items) {
$summary_field = $items[$delta]; $summary_field = $items[0];
if ($summary_info['type'] == 'node_reference') { if ($summary_info['type'] == 'node_reference') {
// Make sure this Node Reference actually references a node. // Make sure this Node Reference actually references a node.
if ($summary_field['nid']) { if ($summary_field['nid']) {
......
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