From 39fec014544f53a2bc95b5adf77d865c8b8a0432 Mon Sep 17 00:00:00 2001 From: Aidan Saunders Date: Mon, 4 Feb 2019 17:50:30 +0000 Subject: [PATCH] dev/core#695 - Make custom searches slightly less fragile --- CRM/Contact/Selector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Contact/Selector.php b/CRM/Contact/Selector.php index 989716ddb4..12f73b41d1 100644 --- a/CRM/Contact/Selector.php +++ b/CRM/Contact/Selector.php @@ -1043,7 +1043,7 @@ class CRM_Contact_Selector extends CRM_Core_Selector_Base implements CRM_Core_Se $selectSQL = "SELECT DISTINCT '$cacheKey', contact_a.id, contact_a.sort_name"; - $sql = str_replace(array("SELECT contact_a.id as contact_id", "SELECT contact_a.id as id"), $selectSQL, $sql); + $sql = str_ireplace(array("SELECT contact_a.id as contact_id", "SELECT contact_a.id as id"), $selectSQL, $sql); try { Civi::service('prevnext')->fillWithSql($cacheKey, $sql); } -- 2.25.1