https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42156 --- Comment #17 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 197871 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197871&action=edit Bug 42156: (QA follow-up) Guard against missing or unparseable authority records The previous defensive block still dereferenced $target_auth unconditionally when attempting to recover via record_strip_nonxml. If Koha::Authorities->find returned undef (stale search index pointing at a deleted authid) the eval around ->record would catch the first failure, but the recovery call on the next line would die uncaught. This patch: - Skips silently when the authid returned by the search engine no longer exists in the database, so get_matches cannot die on a stale index. - Wraps record_strip_nonxml in eval so an exception there is also handled and the record is simply skipped - matching the stated intent of the "skip when not possible" path. Test plan: 1 - Run t/db_dependent/Matcher.t - still passes. 2 - Simulate a stale index: mock search_auth_compat to return an authid that is not present in auth_header. Confirm get_matches no longer dies and returns without error. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.