Move loadDeclartions to reconcile
authorEileen McNaughton <emcnaughton@wikimedia.org>
Sun, 12 Sep 2021 22:28:10 +0000 (10:28 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Sun, 12 Sep 2021 22:28:10 +0000 (10:28 +1200)
I'm getting a loop

CRM/Core/ManagedEntities.php

index 70e72429f76c94b7467070208507288be62ff1c8..c99f450b796c94b6f1b1f9ee346868587d8d317f 100644 (file)
@@ -75,7 +75,6 @@ class CRM_Core_ManagedEntities {
    */
   public function __construct(array $modules) {
     $this->moduleIndex = $this->createModuleIndex($modules);
-    $this->loadDeclarations();
   }
 
   /**
@@ -125,7 +124,7 @@ class CRM_Core_ManagedEntities {
     if (CRM_Core_Config::singleton()->isUpgradeMode() && !$ignoreUpgradeMode) {
       return;
     }
-
+    $this->loadDeclarations();
     if ($error = $this->validate($this->getDeclarations())) {
       throw new CRM_Core_Exception($error);
     }