Gitlab Community Edition Instance

Skip to content
Snippets Groups Projects
Commit efb5a55a authored by Till Brehm's avatar Till Brehm
Browse files

Merge branch '6463-new-lines' into 'develop'

Initialize new_lines array, #6463

Closes #6463

See merge request ispconfig/ispconfig3!1694
parents d340266d 344b6bc6
Branches develop
No related tags found
No related merge requests found
......@@ -547,16 +547,15 @@ function remove_blank_lines($input, $file = 1){
$content = $input;
}
$lines = explode("\n", $content);
$new_lines = array();
if(!empty($lines)){
foreach($lines as $line){
if(trim($line) != '') $new_lines[] = $line;
}
}
if(is_array($new_lines)){
$content = implode("\n", $new_lines);
} else {
$content = '';
}
$content = implode("\n", $new_lines);
if($file){
wf($input, $content);
}else{
......
......@@ -118,16 +118,15 @@ class file{
$content = $input;
}
$lines = explode("\n", $content);
$new_lines = array();
if(!empty($lines)){
foreach($lines as $line){
if(trim($line) != '') $new_lines[] = $line;
}
}
if(is_array($new_lines)){
$content = implode("\n", $new_lines);
} else {
$content = '';
}
$content = implode("\n", $new_lines);
if($file){
$this->wf($input, $content);
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment