From 4dd391ef070041996b4d6935cebae6e7f93e791d Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 16 Apr 2015 13:55:05 -0300 Subject: [PATCH] Bug 13991: (QA followup) uninitialized value and [0] in /tools/viewlog.pl Signed-off-by: Tomas Cohen Arazi --- tools/viewlog.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/viewlog.pl b/tools/viewlog.pl index 4e772d0..ed38a7a 100755 --- a/tools/viewlog.pl +++ b/tools/viewlog.pl @@ -46,7 +46,7 @@ my $input = new CGI; $debug or $debug = $cgi_debug; my $do_it = $input->param('do_it'); my @modules = $input->param("modules"); -my $user = $input->param("user"); +my $user = $input->param("user") // ''; my @actions = $input->param("actions"); my $object = $input->param("object"); my $info = $input->param("info"); @@ -127,7 +127,7 @@ if ($do_it) { my @data; my ( $results, $modules, $actions ); - if ( $actions[0] ne '' ) { $actions = \@actions; } # match All means no limit + if ( defined $actions[0] && $actions[0] ne '' ) { $actions = \@actions; } # match All means no limit if ( $modules[0] ne '' ) { $modules = \@modules; } # match All means no limit $results = GetLogs( $datefrom, $dateto, $user, $modules, $actions, $object, $info ); @data = @$results; -- 2.3.5