From ed8a615e551a3e5e2d27b7432a5156c9c9397e3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20POIROUX?= Date: Tue, 29 Jul 2014 09:39:47 +0200 Subject: [PATCH] Bugfix warning messages Odd number of elements in hash assignment at /etc/munin/plugins/varnish_bans line 884. Use of uninitialized value $ident in hash element at /etc/munin/plugins/varnish_bans line 927. --- plugins/varnish4/varnish4_ | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/varnish4/varnish4_ b/plugins/varnish4/varnish4_ index 5ba23dad..f348151e 100644 --- a/plugins/varnish4/varnish4_ +++ b/plugins/varnish4/varnish4_ @@ -885,7 +885,6 @@ sub usage my %state = ( 'stat' => 0, # inside or not 'field' => 'none', # , , , etc. - 'values' => () ); # Reset the state of XML, mainly used for end-elements. @@ -924,7 +923,7 @@ sub xml_commit_state if ($key eq 'flag') { $data = translate_type($data); } - if (defined($type) and $type ne "") { + if (defined($type) and $type ne "" and defined($ident) and $ident ne "") { $data{$type}{$ident}{$name}{$key} = $data; } else { $data{$name}{$key} = $data