From e4849975156750da26930344aa220d894094d6df Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Mon, 30 Nov 2015 18:56:34 +0200 Subject: [PATCH] If environment does not have its own directory, remove it from the lookup --- system/src/Grav/Common/Config/Setup.php | 6 ++++++ 1 file changed, 6 insertions(+) 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);