diff options
author | Daniel Friesel <derf@finalrewind.org> | 2014-07-10 01:57:21 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2014-07-10 01:57:21 +0200 |
commit | f2a6b13ce49649bddc456f7ae5fc7f56811ce250 (patch) | |
tree | 654bc03a5fd31328ba4efd09de21ac66c5196d79 /bin/icli | |
parent | 4d7dacf51d7ebc8928ef2fa432f05d878d370430 (diff) |
fix uninitialized value when host/service has empty contactgroups list
Diffstat (limited to 'bin/icli')
-rwxr-xr-x | bin/icli | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -463,11 +463,13 @@ sub enhance_status { $s->{contacts} =~ s{^ *}{}o; $s->{contacts} = [ split( m{, *}, $s->{contacts} ) ]; } - for my $group ( split( m{, *}, $s->{contact_groups} ) ) { - push( - @{ $s->{contacts} }, - @{ $config->{contactgroups}{$group} } - ); + if ($s->{contact_groups}) { + for my $group ( split( m{, *}, $s->{contact_groups} ) ) { + push( + @{ $s->{contacts} }, + @{ $config->{contactgroups}{$group} } + ); + } } } } |