[Koha-bugs] [Bug 27011] New: Warnings in returns.pl

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Nov 13 10:31:50 CET 2020


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

            Bug ID: 27011
           Summary: Warnings in returns.pl
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: trivial
          Priority: P5 - low
         Component: Circulation
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: joonas.kylmala at helsinki.fi
        QA Contact: testopia at bugs.koha-community.org
                CC: gmcharlt at gmail.com, kyle.m.hall at gmail.com

When you check-in some books you get the following warnings to error logs:

> [WARN] Use of uninitialized value in concatenation (.) or string at /usr/share/koha/intranet/cgi-bin/circ/returns.pl line 164.
> [WARN] Use of uninitialized value in concatenation (.) or string at /usr/share/koha/intranet/cgi-bin/circ/returns.pl line 402.

This seems to be due to treating the patron fields as non-null values:

> 164     my $name   = $patron ? $patron->surname . ", " . $patron->title . " " . $patron->firstname : '';

The DB schema allows NULL values (and I think that is okay) so we should check
for every one of these whether the value is defined or not before using it.

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


More information about the Koha-bugs mailing list