dev/core#547 Fix Event financial_type_id getOptions
authorMathieu Lutfy <mathieu@symbiotic.coop>
Tue, 10 Mar 2020 21:08:04 +0000 (17:08 -0400)
committerMathieu Lutfy <mathieu@bidon.ca>
Tue, 10 Mar 2020 23:19:56 +0000 (19:19 -0400)
CRM/Event/BAO/Event.php

index df78a6ac9c3cec2b742487ed4a98d7d60e206a93..ec04f44f1e7e6d47bab9e77b7753593a65df8462 100644 (file)
@@ -2351,7 +2351,7 @@ LEFT  JOIN  civicrm_price_field_value value ON ( value.id = lineItem.price_field
         // @fixme - this is going to ignore context, better to get conditions, add params, and call PseudoConstant::get
         // @fixme - https://lab.civicrm.org/dev/core/issues/547 if CiviContribute not enabled this causes an invalid query
         //   because $relationTypeId is not set in CRM_Financial_BAO_FinancialType::getIncomeFinancialType()
-        if (array_key_exists('CiviEvent', CRM_Core_Component::getEnabledComponents())) {
+        if (array_key_exists('CiviContribute', CRM_Core_Component::getEnabledComponents())) {
           return CRM_Financial_BAO_FinancialType::getIncomeFinancialType();
         }
         return [];