Merge pull request #1953 from CachetHQ/fix-setup

fix setup env writing
This commit is contained in:
James Brooks
2016-07-11 19:03:48 +01:00
committed by GitHub
+3 -2
View File
@@ -250,10 +250,11 @@ class SetupController extends Controller
try { try {
(new Dotenv($dir, $file))->load(); (new Dotenv($dir, $file))->load();
$envValue = env(strtoupper($key)) ?: 'null'; $envKey = strtoupper($key);
$envValue = env($envKey) ?: 'null';
file_put_contents($path, str_replace( file_put_contents($path, str_replace(
$envValue, $value, file_get_contents($path) $envKey.'='.$envValue, $envKey.'='.$value, file_get_contents($path)
)); ));
} catch (InvalidPathException $e) { } catch (InvalidPathException $e) {
// //