From 9eeba87dd523349bfdeaeafda8cf006b3b0f156f 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. Signed-off-by: Katrin Fischer --- circ/returns.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/circ/returns.pl b/circ/returns.pl index fab9976ef7..7a45995eed 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