[Koha-bugs] [Bug 27858] Make Koha::Patron::Attribute->store raise an exception on invalid type/code

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Mar 4 12:32:36 CET 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27858

--- Comment #3 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 117680
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117680&action=edit
Bug 27858: Make Koha::Patron::Attribute->store raise an exception on invalid
type/code

This patch adds type validation to the ->store method. And exception
should be thrown if the type is invalid. Things currently explode in
such situations, so this doesn't change the behavior (just adding more
informative failure information).

To test:
1. Apply the previous patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Patron/Attribute.t
=> FAIL: No exception is thrown on the bad case, weird error
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass! Exception thrown!
5. Sign off :-D

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list