https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27729 Bug ID: 27729 Summary: Code around SkipHoldTrapOnNotForLoanValue contains two perl bugs Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Hold requests Assignee: koha-bugs@lists.koha-community.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com A few lines of code were added to CheckReserves containing the wrong use of two perl functions grep and split. A test was added even making these things pass. grep( $notforloan_per_item, @SkipHoldTrapOnNotForLoanValue ) This does not work. The author hoped that the array was checked for the value but perl doesnt support that. Use a block with eq test. split( '|', C4::Context->preference('SkipHoldTrapOnNotForLoanValue') ) Perl split needs a regex but pipe is a special character. It needs escaping. What this does on -1 is, creating an array of - and 1. Confusingly, you can use this in javascript. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.