https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17656 --- Comment #322 from Philip Orr <philip.orr@lmscloud.de> --- Created attachment 196151 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196151&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 <philip.orr@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.