https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25533 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- (In reply to Marcel de Rooy from comment #3)
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 ?
Good catch -- You are receiving this mail because: You are watching all bug changes.