[Koha-bugs] [Bug 19873] Make it possible to search on value 0

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jan 18 18:45:46 CET 2018


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

--- Comment #3 from M. Tompsett <mtompset at hotmail.com> ---
Comment on attachment 70122
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=70122
Bug 19873 - Ability to search on 0 value

Review of attachment 70122:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=19873&attachment=70122)
-----------------------------------------------------------------

::: C4/Search.pm
@@ +1532,4 @@
>          for ( my $i = 0 ; $i <= @operands ; $i++ ) {
>  
>              # COMBINE OPERANDS, INDEXES AND OPERATORS
> +            if ( $operands[$i] ne '' ) {

perhaps a $operands[$i] // q{} ne q{} would be in order.
We don't want floody logs if $operands[$i] is undef.

@@ +1677,4 @@
>                      query_desc => $query_desc,
>                      operator => ($operators[ $i - 1 ]) ? $operators[ $i - 1 ] : '',
>                      parsed_operand => $operand,
> +                    original_operand => ($operands[$i] ne '') ? $operands[$i] : '',

perhaps a $operands[$i] // q{} is sufficient?
We don't want floody logs if $operands[$i] is undef.

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


More information about the Koha-bugs mailing list