Commit cc2d04ec authored by Igor Biki's avatar Igor Biki

ISTWCMS-3491: Fixing php notices in logs. Applying patch...

ISTWCMS-3491: Fixing php notices in logs. Applying patch https://www.drupal.org/files/issues/2019-12-03/3098470-php-notices-on-export.patch
parent fb951ab4
......@@ -151,8 +151,10 @@ class date_ical_plugin_row_ical_fields extends views_plugin_row {
// Create the event by starting with the date array from this row.
$event = $date;
$entity = $row->_field_data[$this->view->base_field]['entity'];
$entity_type = $row->_field_data[$this->view->base_field]['entity_type'];
$entity = isset($row->_field_data[$this->view->base_field]['entity']) ?
$row->_field_data[$this->view->base_field]['entity'] : FALSE;
$entity_type = isset($row->_field_data[$this->view->base_field]['entity_type']) ?
$row->_field_data[$this->view->base_field]['entity_type'] : FALSE;
// Add the CREATED, LAST-MODIFIED, and URL components based on the entity.
// According to the iCal standard, CREATED and LAST-MODIFIED must be UTC.
// Fortunately, Drupal stores timestamps in the DB as UTC, so we just need
......@@ -167,9 +169,11 @@ class date_ical_plugin_row_ical_fields extends views_plugin_row {
// If changed is unset, but created is, use that for last-modified.
$event['last-modified'] = new DateObject($entity->created, 'UTC');
}
$uri = entity_uri($entity_type, $entity);
$uri['options']['absolute'] = TRUE;
$event['url'] = url($uri['path'], $uri['options']);
if ($entity_type && $entity) {
$uri = entity_uri($entity_type, $entity);
$uri['options']['absolute'] = TRUE;
$event['url'] = url($uri['path'], $uri['options']);
}
// Generate a unique ID for this event by emulating the way the Date module
// creates a Date ID.
......
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