if (array_key_exists('civicrm_membership', $this->_whereTables)) {
$component = 'membership';
}
- CRM_Financial_BAO_FinancialType::buildPermissionedClause($this->_whereClause, $component);
+ if (isset($component)) {
+ CRM_Financial_BAO_FinancialType::buildPermissionedClause($this->_whereClause, $component);
+ }
$this->_fromClause = self::fromClause($this->_tables, NULL, NULL, $this->_primaryLocation, $this->_mode);
$this->_simpleFromClause = self::fromClause($this->_whereTables, NULL, NULL, $this->_primaryLocation, $this->_mode);