Fixed _env suffixed config variables causing errors in check_value()

This commit is contained in:
Lenard Hess 2024-03-19 21:55:46 +01:00
parent 09ee38f694
commit 981dd5f333

View file

@ -1852,6 +1852,9 @@ sub init_config {
## make sure config entries have all defaults and they meet minimums
## first the globals...
foreach my $k (keys %globals) {
# Make sure any _env suffixed variables look at their original entry
$k = $1 if $k =~ /^(.*)_env$/;
my $def = $variables{'merged'}{$k};
my $ovalue = $globals{$k} // $def->{'default'};
my $value = check_value($ovalue, $def);
@ -1881,6 +1884,9 @@ sub init_config {
my $conf = { 'protocol' => $proto };
foreach my $k (keys %$svars) {
# Make sure any _env suffixed variables look at their original entry
$k = $1 if $k =~ /^(.*)_env$/;
my $def = $svars->{$k};
my $ovalue = $config{$h}{$k} // $def->{'default'};
my $value = check_value($ovalue, $def);