From cdf9ec4db951a9442a6bcdcd8c590e37e483e9e6 Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Thu, 29 Mar 2018 18:47:25 +0000 Subject: [PATCH] Bug 20499: Fix the Internal Server Error TEST PLAN --------- See comment #1 Applying the test without the patch: messy. Applyin both patches: smooth. Run koha qa test tools --- C4/Circulation.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 3e711cd..177fb1f 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -670,7 +670,7 @@ sub CanBookBeIssued { my $item = GetItem(undef, $barcode ); my $issue = Koha::Checkouts->find( { itemnumber => $item->{itemnumber} } ); my $biblio = Koha::Biblios->find( $item->{biblionumber} ); - my $biblioitem = $biblio->biblioitem; + my $biblioitem = $biblio ? $biblio->biblioitem : undef; my $effective_itemtype = $item->{itype}; # GetItem deals with that my $dbh = C4::Context->dbh; my $patron_unblessed = $patron->unblessed; -- 2.1.4