PHP8 fix - always define locations in event info template
authorJon Goldberg <jon@megaphonetech.com>
Mon, 7 Nov 2022 17:58:12 +0000 (12:58 -0500)
committerJon Goldberg <jon@megaphonetech.com>
Mon, 7 Nov 2022 17:58:12 +0000 (12:58 -0500)
CRM/Event/Page/EventInfo.php

index 92ffc131e1980e7eb30153b12b1b9d423e305108..58681f7177bfdb3a2f48d83e1c8ea1e657ceaa0d 100644 (file)
@@ -178,8 +178,8 @@ class CRM_Event_Page_EventInfo extends CRM_Core_Page {
     $this->assign('action', CRM_Core_Action::VIEW);
     //To show the event location on maps directly on event info page
     $locations = CRM_Event_BAO_Event::getMapInfo($this->_id);
+    $this->assign('locations', $locations);
     if (!empty($locations) && !empty($values['event']['is_map'])) {
-      $this->assign('locations', $locations);
       $this->assign('mapProvider', $config->mapProvider);
       $this->assign('mapKey', $config->mapAPIKey);
       $sumLat = $sumLng = 0;