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 <kyle@bywatersolutions.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Tomás Cohen Arazi 2019-01-02 09:56:52 -03:00 committed by Nick Clemens
parent 3ef3ecfe99
commit 4d671103f4

View file

@ -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();