Avoid loading plugins when their config is an empty hash (#2448)

This commit is contained in:
Maxime Besson 2021-01-28 11:28:14 +01:00
parent e09020a5e9
commit 84684b3b5b

View File

@ -63,7 +63,15 @@ sub enabledPlugins {
# Load static plugin list
for ( my $i = 0 ; $i < @pList ; $i += 2 ) {
push @res, $pList[ $i + 1 ] if ( $conf->{ $pList[$i] } );
my $pluginConf = $conf->{ $pList[$i] };
if ( ref($pluginConf) eq "HASH" ) {
# Do not load plugin if config is an empty hash
push @res, $pList[ $i + 1 ] if %{$pluginConf};
}
else {
push @res, $pList[ $i + 1 ] if $pluginConf;
}
}
# Check if SOAP is enabled