From 3d6d66f4977d43c2b61274adf43eb2cd01258913 Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Wed, 6 Jul 2016 14:17:20 -0400 Subject: [PATCH] Bug 16864: Silence warnings in t/db_dependent/ILSDI_Services.t prove t/db_dependent/ILSDI_Services.t generates noisy output as a result of the ambiguous context of two $cgi->param() calls. By storing into scalar variables, and then using the scalar variables, the code maintains readability and fixes the problem. TEST PLAN --------- 1) prove t/db_dependent/ILSDI_Services.t -- noisy. 2) apply patch 3) prove t/db_dependent/ILSDI_Services.t -- not noisy 4) run koha qa test tools --- C4/ILSDI/Services.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm index 9f5a766..2820fef 100644 --- a/C4/ILSDI/Services.pm +++ b/C4/ILSDI/Services.pm @@ -321,7 +321,9 @@ Parameters: sub AuthenticatePatron { my ($cgi) = @_; - my ($status, $cardnumber, $userid) = C4::Auth::checkpw( C4::Context->dbh, $cgi->param('username'), $cgi->param('password') ); + my $username = $cgi->param('username'); + my $password = $cgi->param('password'); + my ($status, $cardnumber, $userid) = C4::Auth::checkpw( C4::Context->dbh, $username, $password ); if ( $status ) { # Get the borrower my $borrower = GetMember( cardnumber => $cardnumber ); -- 2.1.4