From a14ad6e9a712a3eca1b80094b3ccc4af6369541c Mon Sep 17 00:00:00 2001 From: atif-shaikh Date: Thu, 11 Sep 2014 11:09:17 +0530 Subject: [PATCH] CRM-15231 QA Fix ---------------------------------------- * CRM-15231: Fatal error on search when ACLs are enabled https://issues.civicrm.org/jira/browse/CRM-15231 --- CRM/Contact/BAO/Query.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index 5756247923..ea30128358 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -4698,7 +4698,9 @@ civicrm_relationship.is_permission_a_b = 0 $this->_fromClause = self::fromClause($this->_tables, NULL, NULL, $this->_primaryLocation, $this->_mode); $this->_simpleFromClause = self::fromClause($this->_whereTables, NULL, NULL, $this->_primaryLocation, $this->_mode); // note : this modifies _fromClause and _simpleFromClause - $this->includePseudoFieldsJoin($this->_sort); + if (!empty($this->_sort)) { + $this->includePseudoFieldsJoin($this->_sort); + } } } else { -- 2.25.1