From: eileenmcnaugton Date: Fri, 27 May 2016 04:24:50 +0000 (+1200) Subject: CRM-18684 fix fatal error by backporting 4.7 hack X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f533b210d762cf1a1ec419209a41c151863f9bf7;p=civicrm-core.git CRM-18684 fix fatal error by backporting 4.7 hack --- diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index 9ab5622e9f..4bf2395ece 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -5807,6 +5807,10 @@ AND displayRelType.is_active = 1 else { $orderBy = trim($sort->orderBy()); } + // Deliberately remove the backticks again, as they mess up the evil + // string munging below. This balanced by re-escaping before use. + $orderBy = str_replace('`', '', $orderBy); + if (!empty($orderBy)) { // this is special case while searching for // change log CRM-1718