diff --git a/system/src/Grav/Common/Config/Setup.php b/system/src/Grav/Common/Config/Setup.php index 9bb66853c..70d556472 100644 --- a/system/src/Grav/Common/Config/Setup.php +++ b/system/src/Grav/Common/Config/Setup.php @@ -232,6 +232,12 @@ class Setup extends Data ); } + if (!$locator->findResource('environment://', true)) { + // If environment does not have its own directory, remove it from the lookup. + $this->set('streams.schemes.environment.prefixes', ['' => []]); + $this->initializeLocator($locator); + } + // Create security.yaml if it doesn't exist. $filename = $locator->findResource('config://security.yaml', true, true); $file = YamlFile::instance($filename);