Browse Source

FIX: declared global the loaded module in Module loader

Giancarlo 7 years ago
parent
commit
d756b40c9c
2 changed files with 2 additions and 1 deletions
  1. 1 1
      package.json
  2. 1 0
      src/OpenMind/System/OMUtils.php

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
 {
 	"name": "OM-Link",
 	"name": "OM-Link",
-	"version": "1.9.26",
+	"version": "1.9.27",
 	"private": true,
 	"private": true,
 	"description": "OM-Link Engine",
 	"description": "OM-Link Engine",
 	"author": "Open Mind",
 	"author": "Open Mind",

+ 1 - 0
src/OpenMind/System/OMUtils.php

@@ -73,6 +73,7 @@ class OMUtils
 			$moduleInitPath = "{$item->getPathname()}/{$moduleName}.php";
 			$moduleInitPath = "{$item->getPathname()}/{$moduleName}.php";
 			if (file_exists($moduleInitPath)) { // If already imported, skip
 			if (file_exists($moduleInitPath)) { // If already imported, skip
 				if (!isset($$moduleName)) {
 				if (!isset($$moduleName)) {
+					Global $$moduleName;
 					$$moduleName = new $className(); // Instantiate the Module, all init procedure must reside in __constructor() method
 					$$moduleName = new $className(); // Instantiate the Module, all init procedure must reside in __constructor() method
 					$$moduleName->setTsStartLoad();
 					$$moduleName->setTsStartLoad();
 				}
 				}