Merge branch '5.51' of github.com:civicrm/civicrm-core into up
[civicrm-core.git] / ext / financialacls / financialacls.php
index d96b7c3cfbbf6c5a2e1a487fa76dd26eda73911a..45366d57ba2f926f1707a552dd7e9cd75c4840e4 100644 (file)
@@ -225,8 +225,8 @@ function _financialacls_civicrm_get_accessible_financial_types(): array {
  */
 function _financialacls_civicrm_get_membership_type_clause(): string {
   $financialTypes = _financialacls_civicrm_get_accessible_financial_types();
-  if ($financialTypes === [0]) {
-    return 0;
+  if ($financialTypes === [0] || !CRM_Core_Component::isEnabled('CiviMember')) {
+    return '= 0';
   }
   $membershipTypes = (array) MembershipType::get(FALSE)
     ->addWhere('financial_type_id', 'IN', $financialTypes)->execute()->indexBy('id');