new
This commit is contained in:
parent
44c8481550
commit
e37815352b
|
@ -45,7 +45,8 @@ class PutEnv {
|
|||
}
|
||||
$this->content = file($this->file);
|
||||
foreach ($this->content as $l => $line) {
|
||||
if (strlen(trim($line)) < 1) {
|
||||
$this->content[$l] = $line = trim($line);
|
||||
if (strlen($line) < 1) {
|
||||
if ($lineWasEmpty) {
|
||||
$this->content[$l] = null;
|
||||
} else {
|
||||
|
@ -76,7 +77,7 @@ class PutEnv {
|
|||
$this->content[] = $line;
|
||||
}
|
||||
}
|
||||
$content = implode('', $this->content);
|
||||
$content = implode(PHP_EOL, $this->content);
|
||||
file_put_contents($this->file, $content);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue