Commit 00c3f78b authored by Chris Shantz's avatar Chris Shantz
Browse files

Added isset to fix error with multi-events and no lat/long causing Notice:...

Added isset to fix error with multi-events and no  lat/long causing Notice: Undefined index: und in uw_ct_event_page_build() (line 886).
parent f3fd944e
......@@ -883,8 +883,10 @@ function uw_ct_event_page_build() {
// Add element-invisible to leaflet-container when there is no
// latitude and longitude.
if ($node->field_event_location[LANGUAGE_NONE][0]['latitude'] == '0.000000' && $node->field_event_location[LANGUAGE_NONE][0]['longitude'] == '0.000000') {
drupal_add_js(drupal_get_path('module', 'uw_ct_event') . '/js/leaflet-map-invisible.js');
if (isset($node->field_event_location[LANGUAGE_NONE][0]['latitude']) && ($node->field_event_location[LANGUAGE_NONE][0]['longitude'])) {
if ($node->field_event_location[LANGUAGE_NONE][0]['latitude'] == '0.000000' && $node->field_event_location[LANGUAGE_NONE][0]['longitude'] == '0.000000') {
drupal_add_js(drupal_get_path('module', 'uw_ct_event') . '/js/leaflet-map-invisible.js');
}
}
}
break;
......
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