https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17656
--- Comment #330 from Arthur Suzuki <[email protected]> --- Created attachment 207949 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207949&action=edit Bug 17656: (QA follow-up) guard against NULL irregularity columns and missing enddate Three defensive fixes in Koha::Subscription: 1. irregularities() and permanent_irregularities(): split(';', undef) produces a warning under 'use warnings' and returns ('') — a list containing one empty string — when the column is NULL (which is the case for all existing subscriptions after the DB migration adds permanent_irregularity). The resulting empty-string hash key in guess_irregularities could cause spurious false matches. Fixed by returning an empty list early when the column is NULL/empty. 2. guess_irregularities(): called Delta_Days(..., split(/-/, $enddate)) without checking whether $enddate is defined first. Open-ended subscriptions (weeklength/monthlength without a computed enddate, or any subscription where enddate is NULL) would cause Date::Calc to die with a fatal exception. Fixed by returning an empty list early when enddate is not set. Test plan: Signed-off-by: Philip Orr <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
