From 99de777c5090bdf5e4d9b91cb774e9baf8ab20cd Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 19 Oct 2016 10:09:56 +0000 Subject: [PATCH] Bug 14752 - Followup to fix error if barcode fields undefined Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- acqui/addorder.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/acqui/addorder.pl b/acqui/addorder.pl index 5223b7fc04..c35b8514e5 100755 --- a/acqui/addorder.pl +++ b/acqui/addorder.pl @@ -316,6 +316,7 @@ if ( $basket->{is_standing} || $orderinfo->{quantity} ne '0' ) { 'ITEM'); my $record=MARC::Record::new_from_xml($xml, 'UTF-8'); my ($barcodefield,$barcodesubfield) = GetMarcFromKohaField('items.barcode'); + next unless ( defined $barcodefield && defined $barcodesubfield ); my $barcode = $record->subfield($barcodefield,$barcodesubfield) || ''; my $aBpref = C4::Context->preference('autoBarcode'); if( $barcode eq '' && $aBpref ne 'OFF'){ -- 2.39.5