diff --git a/app/Config/Repository.php b/app/Config/Repository.php index 9051017a..8565025a 100644 --- a/app/Config/Repository.php +++ b/app/Config/Repository.php @@ -63,10 +63,8 @@ class Repository } // fallback to getenv if allowed to - if ($checkEnv) { - if ($this->settings[$name] = env(strtoupper($name))) { - return $this->settings[$name]; - } + if ($checkEnv && ($this->settings[$name] = env(strtoupper($name)))) { + return $this->settings[$name]; } return $default; diff --git a/app/Http/Controllers/SetupController.php b/app/Http/Controllers/SetupController.php index d508f4c3..98e9ca7e 100644 --- a/app/Http/Controllers/SetupController.php +++ b/app/Http/Controllers/SetupController.php @@ -210,7 +210,7 @@ class SetupController extends Controller if ($path === null || ($path !== null && file_exists($path))) { $path = base_path('.env'); file_put_contents($path, str_replace( - getenv(strtoupper($key)), $value, file_get_contents($path) + env(strtoupper($key)), $value, file_get_contents($path) )); } }