From 7a9c838b637c0203d3d229c9f8ac2e5e073a1b71 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 2 Jan 2019 09:56:52 -0300 Subject: [PATCH] Bug 22059: Fix exception params in Koha::Patron->set_password This simple patch fixes a wrong call to ->throw. Parameters shouldn't be enclosed in curly brackets. To test: - Apply the tests patch - Run: $ kshell k$ prove t/db_dependent/Koha/Patrons.t => FAIL: Tests fail because the throw call is wrong - Apply this patch - Run: k$ prove t/db_dependent/Koha/Patrons.t => SUCCESS: Tests pass! -Sign off :-D Signed-off-by: Kyle M Hall Signed-off-by: Josef Moravec Signed-off-by: Nick Clemens (cherry picked from commit 4d671103f420f1c0b80bcbf13be613b69e2aa4f9) Signed-off-by: Martin Renvoize --- Koha/Patron.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Patron.pm b/Koha/Patron.pm index 5831034bdc..3a079f60a1 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -703,7 +703,7 @@ sub set_password { my $password_length = length($password); Koha::Exceptions::Password::TooShort->throw( - { length => $password_length, min_length => $min_length } ); + length => $password_length, min_length => $min_length ); } elsif ( $error eq 'has_whitespaces' ) { Koha::Exceptions::Password::WhitespaceCharacters->throw(); -- 2.39.5