----------------------------------------
* CRM-15231: Fatal error on search when ACLs are enabled
https://issues.civicrm.org/jira/browse/CRM-15231
$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 {