https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44339 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 212801 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212801&action=edit Bug 44339: Do not die in Categories.GetName for an unknown category Koha::Template::Plugin::Categories->GetName did find($categorycode)->description, which dies with "Can't call method description on an undefined value" for a category code that does not exist. The code can come from user input, such as the category filter in the URL of a statistics report, or from data that no longer matches a category, and the page then ended in a 500 error. Return the code itself when there is no such category, and an empty value when there is no code, like the plugin for libraries does. Test plan: 1. In the staff interface go to Reports > Circulation (statistics wizard) 2. Choose Library as the line, Item type as the column, Checkouts as the type of activity, a patron category in the Patron category filter, and submit: the report is displayed 3. In the URL change the value of the category filter (the third Filter parameter) to ZZZ and load the page => Without this patch: a 500 error, Can't call method "description" on an undefined value => With it: the report is displayed, with ZZZ as the patron category 4. prove t/db_dependent/Template/Plugin/Categories.t Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.