Merge pull request #10157 from annando/empty-basepath

Avoid an empty basepath
This commit is contained in:
Hypolite Petovan 2021-04-19 15:52:12 -04:00 committed by GitHub
commit 3b60064978
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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