Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Open sidebar
ISPConfig
ISPConfig 3
Commits
344b6bc6
Verified
Commit
344b6bc6
authored
Feb 08, 2023
by
Helmo
Browse files
Initialize new_lines array,
#6463
parent
7d30386f
Changes
2
Hide whitespace changes
Inline
Side-by-side
install/lib/install.lib.php
View file @
344b6bc6
...
...
@@ -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
{
...
...
server/lib/classes/file.inc.php
View file @
344b6bc6
...
...
@@ -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
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment