From cce2f43e17dfec266aff3e36fadf5a998fd5fcc3 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 (cherry picked from commit 6c5c2d552b061f4b8fafdf7adc4f2e35c97948e4) Signed-off-by: Chris Cormack Conflicts: tools/viewlog.pl --- tools/viewlog.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/viewlog.pl b/tools/viewlog.pl index 43d860a63f..05aff821d0 100755 --- a/tools/viewlog.pl +++ b/tools/viewlog.pl @@ -46,8 +46,8 @@ 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 @action = $input->param("action"); +my $user = $input->param("user") // ''; +my @actions = $input->param("actions"); my $object = $input->param("object"); my $info = $input->param("info"); my $datefrom = $input->param("from"); @@ -126,8 +126,8 @@ $template->param( if ($do_it) { my @data; - my ( $results, $modules, $action ); - if ( $action[0] ne '' ) { $action = \@action; } # match All means no limit + my ( $results, $modules, $actions ); + 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, $action, $object, $info ); @data = @$results; -- 2.39.5