Summary: | Quiet errors in circulation.pl | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | Circulation | Assignee: | Bugs List <koha-bugs> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P5 - low | CC: | gmcharlt, kyle.m.hall, mtompset |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: |
Description
Owen Leonard
2012-09-17 15:28:40 UTC
Good thing I went looking for a duplicate. borrowernumber is a bit more of a problem, as it is harder to trace the logic as to whether it should be q{} or 0. Though, I think 0 would result in different behaviour than undefined in some cases. Any thoughts on this? Regarding line 97, see bug 8826. -- I had put that already up, because some of these patches don't require specialized testing for plakified situations. findborrower, barcode, and print can all be fixed with a || q{} This should deal with line 161, 173 if ( $barcode eq '' and defined($query->param('charges')) and $query->param('charges') eq 'yes' ) { should fix 166 Haven't encountered 364, but I suppose: if ( defined($num_res->{'found'}) and $num_res->{'found'} eq 'W' ) { Haven't encountered 382, but that would be an uglier check. Haven't encountered 388, but I think a ! =~ \S would be in there somehow. (!defined($it->{'author'}) or $it->{'author'} eq '') and $it->{'author'} = ' '; I believe solves 461. if ( (defined ($it->{'issuedate'}) and $it->{'issuedate'} gt $todaysdate) or (defined ($it->{'lastreneweddate'}) and $it->{'lastreneweddate'} gt $todaysdate )) { should fix 464 Regarding the $address, I was thinking: my $address = q{}; $address .= $borrower->{'streetnumber'} if $borrower->{'streetnumber'}; $address .= ' ' if $address and $borrower->{'streettype'}; $address .= $roadttype_hashref->{$borrower->{'streettype'}} if $borrower->{'streettype'}; $address .= ' ' if $address and $borrower->{'address'}; $address .= $borrower->{'address'} if $borrower->{'address'}; But I'm sure there is an optimization somehow. This addresses 644. I haven't generated a patch for any of this yet, since I wouldn't want to step on any toes. Though, your thoughts regarding borrowernumber would be helpful. I did confirm that sth->execute(undef variable) generates 0 just like sth->execute(empty variable) for a "SELECT COUNT(*) ..." as a result of looking through these error log entries. These errors overlap into 3.8.x as well. (In reply to comment #1) > I haven't generated a patch for any of this yet, since I wouldn't want to > step on any toes. I started working on this but got nowhere. I'm unassigning myself, so if you have something to submit please do. bug 8880 should address lines 97, 161, and 173 (which have shifted in the various versions). This overlapped with bug 8826 which only dealt with line 97. The problem is the initializations of $findborrower is less than 3 lines away from the change in bug 8826. So, all changes in bug 8826's patch are included in bug 8880's patch. |