From 9bdfc7a6d64fdd75f5c3f63581722407f45602c7 Mon Sep 17 00:00:00 2001 From: Fabian Kreuzkam Date: Wed, 2 Aug 2023 10:18:34 +0200 Subject: [PATCH] Fixes Issue #5 When searching for the config dir location, isset always returned true for projectDir since it was an empty string by the constructor defaults, resulting in a file exists on /config/application.config instead of config/application.config Signed-off-by: Fabian Kreuzkam --- src/ConfigDiscoveryTrait.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ConfigDiscoveryTrait.php b/src/ConfigDiscoveryTrait.php index e96b4f2..4db601a 100644 --- a/src/ConfigDiscoveryTrait.php +++ b/src/ConfigDiscoveryTrait.php @@ -116,7 +116,7 @@ private function getApplicationConfig() return $this->applicationConfig; } - $configFile = isset($this->projectDir) + $configFile = !empty($this->projectDir) ? sprintf('%s/%s', $this->projectDir, $this->applicationConfigPath) : $this->applicationConfigPath;