diff --git a/src/Builder.php b/src/Builder.php index 26241a6..86e99bf 100644 --- a/src/Builder.php +++ b/src/Builder.php @@ -172,10 +172,12 @@ public function buildConfig($name, array $configs, $defines = []) protected function pushEnvVars($vars) { $env = $this->vars['dotenv']; - foreach (array_keys($vars) as $key) { - $envKey = strtoupper(strtr($key, '.', '_')); - if (isset($env[$envKey])) { - $vars[$key] = $env[$envKey]; + if (!empty($vars)) { + foreach (array_keys($vars) as $key) { + $envKey = strtoupper(strtr($key, '.', '_')); + if (isset($env[$envKey])) { + $vars[$key] = $env[$envKey]; + } } }