mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-22 13:07:59 +01:00
Closes #42 -- Check for specific "null" string when doing string replacement.
This commit is contained in:
parent
f30f17e80a
commit
a760527e49
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue