From 09860b0eb5c3f21a79d4a6b53d03281570efa4d3 Mon Sep 17 00:00:00 2001 From: Matthias Meusburger Date: Thu, 7 Dec 2017 13:44:50 +0000 Subject: [PATCH] Bug 19771: Prevent Pending offline circulation actions page from crashing when there is an unknown barcode Test plan: Use the koct firefox plugin or a .koc file and make a return with an unknown barcode. Display the Pending offline circulation actions page: offline_circ/list.pl => The page crashes with a software error: Can't call method "biblio" on an undefined value at /home/koha/src/offline_circ/list.pl line 50. Apply the patch, repeat the test plan. => The page shows the list correctly. Click on process. The unknown barcode is marked as Item not found. --- offline_circ/list.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/offline_circ/list.pl b/offline_circ/list.pl index 5981f35..5f7e6e4 100755 --- a/offline_circ/list.pl +++ b/offline_circ/list.pl @@ -47,6 +47,7 @@ my $operations = GetOfflineOperations; for (@$operations) { my $item = Koha::Items->find({ barcode => $_->{barcode} }); + next unless $item; my $biblio = $item->biblio; $_->{'bibliotitle'} = $biblio->title; $_->{'biblionumber'} = $biblio->biblionumber; -- 2.7.4