[Koha-bugs] [Bug 14015] Checkout: Fix software error if barcode '0' is given

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Dec 28 10:53:17 CET 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14015

--- Comment #15 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Marc,
Try with only this change:

diff --git a/circ/circulation.pl b/circ/circulation.pl
index f16475e..fa62dcc 100755
--- a/circ/circulation.pl
+++ b/circ/circulation.pl
@@ -88,7 +88,9 @@ if (!C4::Context->userenv && !$branch){
 }

 my $barcodes = [];
-if ( my $barcode = $query->param('barcode') ) {
+my $barcode =  $query->param('barcode');
+# Barcode given by user could be '0'
+if ( $barcode || $barcode eq '0' ) {
     $barcodes = [ $barcode ];
 } else {
     my $filefh = $query->upload('uploadfile');
@@ -215,12 +217,13 @@ if( $onsite_checkout && !$duedatespec_allow ) {
 }

It will work.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list