mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Surround multiple words with quotes in env file
This commit is contained in:
parent
7d96a6d389
commit
ba6c157128
@ -128,13 +128,14 @@ trait AppSetup
|
||||
}
|
||||
}
|
||||
|
||||
// This should never happen, but this is login just in case.
|
||||
// Variables that will be replaced (updated with different content) should already be in .env file.
|
||||
$words_count = count(explode(' ', trim($value)));
|
||||
|
||||
if (is_null($position)) {
|
||||
$env[] = "{$property}=" . $value . "\n";
|
||||
$env[] = "{$property}=" . $value . "\n"; // If we don't have entry for variable in the .env, write it.
|
||||
} else if ($words_count > 1) {
|
||||
$env[$position] = "{$property}=" . '"' . $value . '"' . "\n"; // If value of variable is more than one word, surround with quotes.
|
||||
} else {
|
||||
$env[$position] = "{$property}=" . $value . "\n";
|
||||
$env[$position] = "{$property}=" . $value . "\n"; // Just a normal variable update, with prexisting keys.
|
||||
}
|
||||
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user