http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13025 Bug ID: 13025 Summary: Software error: Undefined subroutine &C4::Circulation::HasOverdues called at /home/koha/kohaclone/C4/Circulation.pm line 1925 Change sponsored?: --- Product: Koha Version: 3.14 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: barton@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com One of our partners is seeing the following Software error intermittently on checkout: Undefined subroutine &C4::Circulation::HasOverdues called at /home/koha/kohaclone/C4/Circulation.pm line 1925, <DATA> line 522. Here's the offending code: 1924 # Remove any OVERDUES related debarment if the borrower has no overdues 1925 if ( $borrowernumber 1926 && $borrower->{'debarred'} 1927 && C4::Context->preference('AutoRemoveOverduesRestrictions') 1928 && !HasOverdues( $borrowernumber ) 1929 && @{ GetDebarments({ borrowernumber => $borrowernumber, type => 'OVERDUES' }) } 1930 ) { 1931 DelUniqueDebarment({ borrowernumber => $borrowernumber, type => 'OVERDUES' }); 1932 } I'm not *entirely* sure why this is happening -- HasOverdues is defined in C4/Members.pm: 53 push @EXPORT, qw( 54 &Search 55 &GetMemberDetails 56 &GetMemberRelatives ... 108 HasOverdues 109 ); and C4::Members is being included in C4/Circulation.pm: 30 use C4::Members; ... so !HasOverdues( $borrowernumber ) *shouldn't* be interpreted as a call to &C4::Circulation::HasOverdues ... nonetheless, calling 1928 && !HasOverdues( $borrowernumber ) could be re-written as 1928 && ! C4::Members::HasOverdues( $borrowernumber ) which would be un-ambiguously correct. For the sake of consistency, the call to HasOverdues at C4/Circulation.pm line 2626 should also be changed. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.