[Koha-bugs] [Bug 8777] Quiet errors in circulation.pl

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Sep 27 12:20:28 CEST 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8777

M. Tompsett <mtompset at hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mtompset at hotmail.com

--- Comment #1 from M. Tompsett <mtompset at hotmail.com> ---
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.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list