Merge pull request #22992 from eileenmcnaughton/billingnot
[civicrm-core.git] / CRM / Core / Resources.php
index d956cd90e820ed72c7633c7d84e35aab7aad2662..6945376e6120e76d07d63190ef7cbc3ca1b86ee1 100644 (file)
@@ -501,11 +501,10 @@ class CRM_Core_Resources implements CRM_Core_Resources_CollectionAdderInterface
       'filters' => [],
       'links' => [],
     ];
-    $enabledComponents = Civi::settings()->get('enable_components');
 
     foreach (CRM_Core_DAO_AllCoreTables::daoToClass() as $entity => $daoName) {
       // Skip DAOs of disabled components
-      if (defined("$daoName::COMPONENT") && !in_array($daoName::COMPONENT, $enabledComponents, TRUE)) {
+      if (defined("$daoName::COMPONENT") && !CRM_Core_Component::isEnabled($daoName::COMPONENT)) {
         continue;
       }
       $baoName = str_replace('_DAO_', '_BAO_', $daoName);
@@ -570,7 +569,7 @@ class CRM_Core_Resources implements CRM_Core_Resources_CollectionAdderInterface
   }
 
   /**
-   * @param string|NULL $region
+   * @param string|null $region
    *   Optional request for a specific region. If NULL/omitted, use global default.
    * @return \CRM_Core_Region
    */