https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43943

            Bug ID: 43943
           Summary: Koha::Z3950Responder::Session->add_item_status uses
                    next instead of return
   Initiative type: ---
        Sponsorship ---
            status:
           Product: Koha
           Version: Main
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P5 - low
         Component: Z39.50 / SRU / OpenSearch Servers
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected]
  Target Milestone: ---

Koha::Z3950Responder::Session->add_item_status skips the item fields without an
itemnumber with:

    next unless $itemnumber;

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 works
because the only caller (fetch_handler) calls it inside a foreach loop over the
item fields, and it would die if called outside a loop.

It should be a return, as the method already does a few lines below when the
item does not exist.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
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/

Reply via email to