From 8751e361e65aa15873d86bc179ac7c29a9446e75 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Marc Signed-off-by: Jonathan Druart Signed-off-by: Brendan Gallagher (cherry picked from commit ef0738922005e4235b80e70663d7fa711a87556e) Signed-off-by: Frédéric Demians (cherry picked from commit ad5acf73bc03f2a68ebbaa27c3d9399ce38551ae) Signed-off-by: Julian Maurice --- 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 e69c0703d7..ba14505b15 100644 --- a/C4/ILSDI/Services.pm +++ b/C4/ILSDI/Services.pm @@ -320,7 +320,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.39.5