Commit a816f00b authored by Kevin Paxman's avatar Kevin Paxman
Browse files

Add check to avoid error messages on pages that don't show the time

parent e1e3cc81
......@@ -1425,8 +1425,8 @@ function uw_ct_event_date_formatter_dates_alter(&$dates, $context) {
// Ignore the formatting settings and provide our own.
// Currently requires the field to be set NOT to show the end date, or odd things will happen.
//only do this for event dates
if (isset($context['field']['field_name']) && $context['field']['field_name'] == 'field_event_date') {
//only do this for event dates with a timezone
if (isset($context['field']['field_name']) && $context['field']['field_name'] == 'field_event_date' && isset($context['item']['timezone'])) {
$orig_timezone = date_default_timezone_get();
$timezone = $context['item']['timezone'];
$start = $context['item']['value'];
Supports Markdown
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