https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27858
--- Comment #14 from Joonas Kylmälä <[email protected]> --- Created attachment 118599 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118599&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 Signed-off-by: Martin Renvoize <[email protected]> Signed-off-by: Joonas Kylmälä <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
