Avoid empty basepath when loading database structure
authorMichael <heluecht@pirati.ca>
Mon, 19 Apr 2021 19:42:57 +0000 (19:42 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 19 Apr 2021 19:42:57 +0000 (19:42 +0000)
src/Database/DBStructure.php

index 0c1a46d..82e4059 100644 (file)
@@ -192,6 +192,9 @@ class DBStructure
        public static function definition($basePath, $with_addons_structure = true)
        {
                if (!self::$definition) {
+                       if (empty($basePath)) {
+                               $basePath = DI::app()->getBasePath();
+                       }
 
                        $filename = $basePath . '/static/dbstructure.config.php';