Exception::Class requires parameters to be passed as a list instead of a hashref. Then this is wrong: Koha::Exceptions::Password::TooShort->throw({ length => $password_length, min_length => $min_length }); this is ok: Koha::Exceptions::Password::TooShort->throw( length => $password_length, min_length => $min_length ); This is a minor issue anyway, preventing exceptions from being stringified correctly.
Created attachment 83574 [details] [review] Bug 22059: regression tests
Created attachment 83575 [details] [review] 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
Created attachment 83576 [details] [review] Bug 22059: regression tests Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 83577 [details] [review] 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>
Created attachment 83607 [details] [review] Bug 22059: regression tests Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 83608 [details] [review] 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>
Awesome work all! Pushed to master for 19.05
Pushed to 18.11.x for 18.11.02
21178 not in 18.05, not backporting