mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2025-03-29 14:27:46 +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) {
|
protected function setEnvironmentVariable($key, $oldValue, $newValue) {
|
||||||
$path = base_path('.env');
|
$path = base_path('.env');
|
||||||
|
|
||||||
|
// Detect the specific "null" value.
|
||||||
|
if ($oldValue === null)
|
||||||
|
$oldValue = 'null';
|
||||||
|
|
||||||
if (file_exists($path)) {
|
if (file_exists($path)) {
|
||||||
file_put_contents($path, str_replace(
|
file_put_contents($path, str_replace(
|
||||||
"$key=" . $oldValue, "$key=" . $newValue, file_get_contents($path)
|
"$key=" . $oldValue, "$key=" . $newValue, file_get_contents($path)
|
||||||
|
|
Loading…
Add table
Reference in a new issue