From 01a199b445e9983209c26d18e1bb3be8730cc535 Mon Sep 17 00:00:00 2001 From: Jon Goldberg Date: Mon, 18 Mar 2019 17:59:47 -0400 Subject: [PATCH] escape string to avoid fatal on search builder when sort name has an apostrophe --- CRM/ConstituentsOnly/BAO/ConstituentsOnly.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/ConstituentsOnly/BAO/ConstituentsOnly.php b/CRM/ConstituentsOnly/BAO/ConstituentsOnly.php index b5c6c30..21372ce 100644 --- a/CRM/ConstituentsOnly/BAO/ConstituentsOnly.php +++ b/CRM/ConstituentsOnly/BAO/ConstituentsOnly.php @@ -228,7 +228,7 @@ class CRM_ConstituentsOnly_BAO_ConstituentsOnly { "'{$cid}'", "'{$cid}'", "'{$prevCacheKey}'", - "'" . $newRows[$cid]['sort_name'] . "')", + "'" . CRM_Core_DAO::escapeString($newRows[$cid]['sort_name']) . "')", ]; CRM_Core_BAO_PrevNextCache::setItem($prevCache); } -- 2.45.2