https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43943 --- Comment #1 from Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> --- Created attachment 209723 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209723&action=edit Bug 43943: Use return instead of next in Koha::Z3950Responder::Session->add_item_status add_item_status skipped the item fields without an itemnumber with 'next unless $itemnumber'. Using next inside a subroutine exits it and jumps to the next iteration of the caller's loop, with the warning "Exiting subroutine via next". It only worked because the only caller calls it inside a foreach loop, and it would die if called outside a loop. This patch uses return instead, as the method already does a few lines below when the item does not exist. Steps to follow: 1. Apply the patch. 2. prove t/db_dependent/Koha/Z3950Responder/ 3. All the tests pass. 4. Revert the change in Koha/Z3950Responder/Session.pm and repeat step 2: the add_item_status subtest stops after 3 tests ("Looks like you planned 5 tests but ran 3") and Test::NoWarnings reports "Exiting subroutine via next". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Adolfo Rodríguez <adolfo.rodriguez@xercode.es> -- You are receiving this mail because: You are watching all bug changes.