From 324b63f21fd8012e2a10f3c1b558d2850f8491e5 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 17 Sep 2020 15:01:32 +0100 Subject: [PATCH] Bug 25261: (QA follow-up) Prevent server error on bad barcode Prior to this patch if you had CircConfirmParts enabled and you attempted to checkin a deleted item then you would be met with a server error. --- circ/returns.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/circ/returns.pl b/circ/returns.pl index b1b05f1959..5c8ce00d7a 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -297,9 +297,11 @@ if ($barcode) { # Block return if multi-part and confirm has not been received my $needs_confirm = C4::Context->preference("CircConfirmItemParts") + && $item && $item->materials && !$query->param('multiple_confirm'); - $template->param('multiple_confirmed' => 1) if $query->param('multiple_confirm'); + $template->param( 'multiple_confirmed' => 1 ) + if $query->param('multiple_confirm'); # do the return ( $returned, $messages, $issue, $borrower ) = -- 2.20.1