mirror of
https://github.com/webmin/webmin.git
synced 2025-08-16 14:51:18 +00:00
Handle case where FPM config contains no PHP options yet https://forum.virtualmin.com/t/pfp-fpm-default-configuration/127002
This commit is contained in:
@ -162,6 +162,10 @@ for(my $i=0; $i<@old || $i<@values; $i++) {
|
||||
else {
|
||||
# Just add at the end
|
||||
$lastfile = @$conf ? $conf->[0]->{'file'} : undef;
|
||||
if (!$lastfile) {
|
||||
my @allfiles = keys %get_config_cache;
|
||||
$lastfile = $allfiles[0] if (@allfiles == 1);
|
||||
}
|
||||
$lastfile || &error("Don't know which file to add to");
|
||||
$lref = &read_file_lines_as_user($lastfile);
|
||||
$lastline = scalar(@$lref);
|
||||
|
Reference in New Issue
Block a user