Profile page #30

Open
Sieciech wants to merge 34 commits from 29-profile-page into dev
1 changed files with 3 additions and 2 deletions
Showing only changes of commit e37815352b - Show all commits

View File

@ -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);
}
}