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

Marcel de Rooy <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
             Status|Signed Off                  |Failed QA

--- Comment #3 from Marcel de Rooy <[email protected]> ---
Thanks for your patch !
You remove the warning, but are you interpreting the value correctly?

-        my $holds_per_record = $rule ? $rule->{holds_per_record} : 0;
+        my $holds_per_record = $rule ? $rule->{holds_per_record} || 0 : 0;
         $max = $holds_per_record if $holds_per_record > $max;

If space or empty string means Unlimited and we replace it by 0, would our
compares be correct ?
Note that perl now does the same thing but removing the warn will only hide the
problem you found in this code !
I see that code is calculating the number of remaining holds:

 my $remaining_holds_for_record = $max_holds_for_record - $holds->count();

If max is 0 but should mean Unlimited, this definitely goes wrong ?

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
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