From 49d1bc01c484e511e58d54a84d3dca773ca0d967 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 15 Sep 2023 12:14:41 +1200 Subject: [PATCH] Fix unnecessary pass-by-ref --- CRM/Event/BAO/Event.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/CRM/Event/BAO/Event.php b/CRM/Event/BAO/Event.php index f2a5e6dee7..24e2438da3 100644 --- a/CRM/Event/BAO/Event.php +++ b/CRM/Event/BAO/Event.php @@ -667,9 +667,9 @@ $event_summary_limit * * @return array */ - public static function &getMapInfo(&$id) { + public static function getMapInfo($id): array { - $sql = " + $sql = ' SELECT civicrm_event.id AS event_id, civicrm_event.title AS display_name, @@ -691,10 +691,9 @@ FROM LEFT JOIN civicrm_location_type ON ( civicrm_location_type.id = civicrm_address.location_type_id ) WHERE civicrm_address.geo_code_1 IS NOT NULL AND civicrm_address.geo_code_2 IS NOT NULL - AND civicrm_event.id = " . CRM_Utils_Type::escape($id, 'Integer'); + AND civicrm_event.id = ' . CRM_Utils_Type::escape($id, 'Integer'); - $dao = new CRM_Core_DAO(); - $dao->query($sql); + $dao = CRM_Core_DAO::executeQuery($sql); $locations = []; -- 2.25.1