[Koha-bugs] [Bug 8799] New: Non-existing analytics field triggers error log

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Sep 21 02:39:36 CEST 2012


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

          Priority: P5 - low
 Change sponsored?: ---
            Bug ID: 8799
          Assignee: oleonard at myacpl.org
           Summary: Non-existing analytics field triggers error log
          Severity: minor
    Classification: Unclassified
                OS: All
          Reporter: mtompset at hotmail.com
          Hardware: All
            Status: NEW
           Version: unspecified
         Component: OPAC
           Product: Koha

[Wed Sep 19 18:53:14 2012] [error] [client 192.168.100.2] [Wed Sep 19 18:53:14
2012] opac-search.pl: Use of uninitialized value in split at
/usr/share/koha/opac/cgi-bin/opac/opac-search.pl line 394.

This is the end of a loop, which generally means the loop condition is the
problem.

my $analyticfield = '773';
if ($marcflavour eq 'MARC21' || $marcflavour eq 'NORMARC'){
    $analyticfield = '773';
} elsif ($marcflavour eq 'UNIMARC') {
    $analyticfield = '461';
}
foreach my $hostfield ( $record->field($analyticfield)) {

I am positive that our records do not have any 773 fields. So a simple if
(defined(...)) { ... } around the loop should solve the error log flooding, as
analytic fields are not required, as far as I know.

This applies to 3.6.x, 3.8.x, and master.

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


More information about the Koha-bugs mailing list