CIVI-28 Notice fixes
[civicrm-core.git] / CRM / Contact / BAO / Query.php
index f28c61a68b60fcdb57f30350f6bd06b576974dd8..47a98924571ced15f285190baf9b1ffd75e614dc 100644 (file)
@@ -499,7 +499,9 @@ class CRM_Contact_BAO_Query {
     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);