CRM-15231 QA Fix
authoratif-shaikh <shaikh388@gmail.com>
Thu, 11 Sep 2014 05:39:17 +0000 (11:09 +0530)
committeratif-shaikh <shaikh388@gmail.com>
Thu, 11 Sep 2014 05:39:17 +0000 (11:09 +0530)
----------------------------------------
* CRM-15231: Fatal error on search when ACLs are enabled
  https://issues.civicrm.org/jira/browse/CRM-15231

CRM/Contact/BAO/Query.php

index 5756247923e7f0ec63922fc338426585cbf5483c..ea3012835848d39c8480bc5bd8087799d1006435 100644 (file)
@@ -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 {