Commit 65387cae authored by Clément OUDOT's avatar Clément OUDOT
Browse files

Do not use allowempty flag in Config::IniFiles (close bug #314539)

parent 71fce1ff
......@@ -193,7 +193,6 @@ sub getLocalConf {
# Parse ini file
my $cfg = Config::IniFiles->new(
-file => $file,
-allowempty => 1,
);
unless ( defined $cfg ) {
......
......@@ -92,7 +92,9 @@ sub localInit {
# Get local configuration parameters
my $localconf = $lmConf->getLocalConf( HANDLERSECTION );
$args->{$_} ||= $localconf->{$_} foreach ( keys %$localconf );
if ( $localconf ) {
$args->{$_} ||= $localconf->{$_} foreach ( keys %$localconf );
}
# Store in localConfig global variable
$localConfig = $args;
......
......@@ -65,7 +65,9 @@ sub new {
# Try to load local configuration parameters to get 'protection'
my $localconf = $self->config->getLocalConf( MANAGERSECTION );
$args->{protection} ||= $localconf->{protection};
if ( $localconf ) {
$args->{protection} ||= $localconf->{protection};
}
if ( $args->{protection} ) {
require Lemonldap::NG::Handler::CGI;
......@@ -74,7 +76,9 @@ sub new {
}
# Now push all local configuration parameters
$self->{$_} = $args->{$_} || $localconf->{$_} foreach ( keys %$localconf );
if ( $localconf ) {
$self->{$_} = $args->{$_} || $localconf->{$_} foreach ( keys %$localconf );
}
foreach (qw(dhtmlXTreeImageLocation)) {
unless ( $self->{$_} ) {
......
......@@ -49,7 +49,9 @@ sub getConf {
# 2/ Local file configuration
# 3/ Script embedded configuration
$self->{$_} = $args{$_} || $globalconf->{$_} foreach ( keys %$globalconf );
$self->{$_} = $args{$_} || $localconf->{$_} foreach ( keys %$localconf );
if ( $localconf ) {
$self->{$_} = $args{$_} || $localconf->{$_} foreach ( keys %$localconf );
}
1;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment