Closes #42 -- Check for specific "null" string when doing string replacement.

This commit is contained in:
Buster Silver 2015-12-26 10:29:36 -06:00
parent f30f17e80a
commit a760527e49

View file

@ -104,6 +104,10 @@ class PoniverseApiSetup extends Command
protected function setEnvironmentVariable($key, $oldValue, $newValue) {
$path = base_path('.env');
// Detect the specific "null" value.
if ($oldValue === null)
$oldValue = 'null';
if (file_exists($path)) {
file_put_contents($path, str_replace(
"$key=" . $oldValue, "$key=" . $newValue, file_get_contents($path)