From: atif-shaikh Date: Thu, 11 Sep 2014 05:39:17 +0000 (+0530) Subject: CRM-15231 QA Fix X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a14ad6e9a712a3eca1b80094b3ccc4af6369541c;p=civicrm-core.git CRM-15231 QA Fix ---------------------------------------- * CRM-15231: Fatal error on search when ACLs are enabled https://issues.civicrm.org/jira/browse/CRM-15231 --- 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 {