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

            Bug ID: 41864
           Summary: Simple OPAC search generates warnings: Odd number of
                    elements in anonymous hash
   Initiative type: ---
        Sponsorship ---
            status:
           Product: Koha
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected]
        Depends on: 40966

After introducing Bug 40966 opac-search.pl, when invoked in the 
simple form (not as advanced search) generates warnings like:

[WARN] Odd number of elements in anonymous hash at
/kohadevbox/koha/opac/opac-search.pl line 529.

This is because 'weight_search_submitted' is not initialized for 
this search.

You get the same effect with this simple test:

#!/usr/bin/perl
use Modern::Perl;
use Data::Dumper;

say Dumper(
    {
        one => 1,
        two => &und
    }
);

sub und {

    #return undef;
}


But if you uncomment 'return undef', there is no warning.

So most probably, in this case, $cgi->param('weight_search_submitted') 
returns an empty list, not an undef.


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966
[Bug 40966] 'whole_record' and 'weighted_fields' not passed around
-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to