From 7832d89889ca5b91e78e4e48fd91efd28b5a9fa6 Mon Sep 17 00:00:00 2001 From: Neil Jennings Date: Thu, 9 Jan 2020 11:18:34 +0000 Subject: [PATCH] Update InstallController.php --- src/Http/Controllers/InstallController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Controllers/InstallController.php b/src/Http/Controllers/InstallController.php index 907f466..ab9bfd3 100644 --- a/src/Http/Controllers/InstallController.php +++ b/src/Http/Controllers/InstallController.php @@ -170,7 +170,7 @@ public function saveDatabaseSettings() $dotEnv = Dotenv::create([base_path()]); foreach ($dotEnv->load() as $envVar => $envValue) { if (key_exists($envVar, $updateEnv)) { - $envFileContents = preg_replace('#' . $envVar . '\s*=\s*\"*' . $envValue . '\s*\"\s*#', $envVar . '=' . $updateEnv[$envVar] . "\n", $envFileContents); + $envFileContents = preg_replace('#' . $envVar . '.*=.*' . $envValue . '.*#', $envVar . '=' . $updateEnv[$envVar], $envFileContents); } }