https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24254
--- Comment #21 from Tomás Cohen Arazi <[email protected]> --- Created attachment 114539 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114539&action=edit Bug 24354: Compare itemlost with Perl's false values On C4::Search and C4::Circulation the uses of the items.itemlost field highlight the fact that the comparisson itemlost <= 0 was wrong, as it is evaluated as a Perl boolean. As authorised values can take many values that can be casted to 'false', we need to compare with them explicitly. This patch changes the tests to reflect this, and adjust the Koha::Items->filter_by_visible_in_opac implementation to adapt to this. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Items.t => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <[email protected]> -- 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/
