Merge pull request #6563 from turbo124/v5-develop

Wrap all env vars in double quotes
This commit is contained in:
David Bomba 2021-09-03 22:30:22 +10:00 committed by GitHub
commit 98c4b58b51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -136,10 +136,8 @@ trait AppSetup
if (is_null($position)) { if (is_null($position)) {
$words_count > 1 ? $env[] = "{$property}=" . '"' . $value . '"' . "\n" : $env[] = "{$property}=" . $value . "\n"; $words_count > 1 ? $env[] = "{$property}=" . '"' . $value . '"' . "\n" : $env[] = "{$property}=" . $value . "\n";
} elseif ($words_count > 1) {
$env[$position] = "{$property}=" . '"' . $value . '"' . "\n"; // If value of variable is more than one word, surround with quotes.
} else { } else {
$env[$position] = "{$property}=" . $value . "\n"; // Just a normal variable update, with pre-existing keys. $env[$position] = "{$property}=" . '"' . $value . '"' . "\n"; // If value of variable is more than one word, surround with quotes.
} }
try { try {