Fix Undefined index: und in groups_events_date_formatter_dates_alter

The date alter throw this notice when the timezone field was not
properly hold a value.

Change-Id: I59a79714fb7dc1fcfce61318ad90889cba45db18
This commit is contained in:
Marton Kiss 2016-07-23 08:26:07 +02:00
parent ab47a69af2
commit 719d8f3a17
1 changed files with 3 additions and 3 deletions

View File

@ -62,9 +62,9 @@ function groups_events_date_formatter_dates_alter(&$dates, $context) {
$target_id = $entity->og_group_ref[LANGUAGE_NONE][0]['target_id'];
$node = node_load($target_id);
$timezone = $node->field_timezone[LANGUAGE_NONE][0]['value'];
if (empty($timezone)) {
$timezone = 'UTC';
$timezone = 'UTC';
if (isset($node->field_timezone[LANGUAGE_NONE])) {
$timezone = $node->field_timezone[LANGUAGE_NONE][0]['value'];
}
$process = date_process_values($field);