Bug 13991: Uninitialized value $src in /tools/viewlog.pl
authorMarc Véron <veron@veron.ch>
Tue, 14 Apr 2015 05:25:45 +0000 (07:25 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Thu, 16 Apr 2015 17:16:33 +0000 (14:16 -0300)
To reproduce:

Go to Home > Tools > Logs
Check intranet-error.log.
You will find a line similar to:
viewlog.pl: Use of uninitialized value $src in string eq at (...)/tools/viewlog.pl line 70., referer: http://(...)/cgi-bin/koha/tools/tools-home.pl

To test:
Apply patch.
Verify that no more warnings appear in intranet-error.log
Verify that the log viewer behaves as before.

Signed-off-by: Andreas Hedström Mace <andreas.hedstrom.mace@sub.su.se>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
tools/viewlog.pl

index c867226..4e772d0 100755 (executable)
@@ -54,7 +54,7 @@ my $datefrom = $input->param("from");
 my $dateto   = $input->param("to");
 my $basename = $input->param("basename");
 my $output   = $input->param("output") || "screen";
-my $src      = $input->param("src"); # this param allows us to be told where we were called from -fbcit
+my $src      = $input->param("src") || ""; # this param allows us to be told where we were called from -fbcit
 
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
     {