https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19873 --- Comment #4 from Alex Arnaud <alex.arnaud@biblibre.com> --- (In reply to M. Tompsett from comment #3)
Comment on attachment 70122 [details] [review] Bug 19873 - Ability to search on 0 value
Review of attachment 70122 [details] [review]: -----------------------------------------------------------------
::: 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.
We want to search on 0 value. And $operands[$i] // q{} is false if $operands[$i] equals 0: (0 ne '') => 1 (0 // '') => 0 (0 // q{}) => 0 (0 ne q{}) => 0 -- You are receiving this mail because: You are watching all bug changes.