Update EnvironmentWriterTrait to allow empty string in CLI (#421)
This commit is contained in:
parent
70c31eef8f
commit
e08cbdecd4
@ -33,7 +33,7 @@ trait EnvironmentWriterTrait
|
||||
$saveContents = file_get_contents($path);
|
||||
collect($values)->each(function ($value, $key) use (&$saveContents) {
|
||||
$key = strtoupper($key);
|
||||
$saveValue = sprintf('%s=%s', $key, $this->escapeEnvironmentValue($value));
|
||||
$saveValue = sprintf('%s=%s', $key, $this->escapeEnvironmentValue($value ?? ''));
|
||||
|
||||
if (preg_match_all('/^' . $key . '=(.*)$/m', $saveContents) < 1) {
|
||||
$saveContents = $saveContents . PHP_EOL . $saveValue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user