Bugzilla – Attachment 137903 Details for
Bug 31192
Checking in an unkown barcode causes error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31192: Check for item before calling is_bundle
Bug-31192-Check-for-item-before-calling-isbundle.patch (text/plain), 1.29 KB, created by
Biblibre Sandboxes
on 2022-07-20 08:48:40 UTC
(
hide
)
Description:
Bug 31192: Check for item before calling is_bundle
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2022-07-20 08:48:40 UTC
Size:
1.29 KB
patch
obsolete
>From 7a191ed2b61b81101800cc0803e15c754f656638 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 20 Jul 2022 09:29:39 +0100 >Subject: [PATCH] Bug 31192: Check for item before calling is_bundle > >The code in here is weird.. we really aught to check for the item before >anything else and throw an error to screen if we don't find one... but >my patch takes the simple option, and the one taken elsewhere in the >script.. to just check for item being defined before calling a method >upon it. > >Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> >--- > circ/returns.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/circ/returns.pl b/circ/returns.pl >index 7399568cf5..c118260cb4 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -410,7 +410,7 @@ if ($barcode) { > } > > # Mark missing bundle items as lost and report unexpected items >- if ( $item->is_bundle && $query->param('confirm_items_bundle_return') ) { >+ if ( $item && $item->is_bundle && $query->param('confirm_items_bundle_return') ) { > my $BundleLostValue = C4::Context->preference('BundleLostValue'); > my $barcodes = $query->param('verify-items-bundle-contents-barcodes'); > my @barcodes = map { s/^\s+|\s+$//gr } ( split /\n/, $barcodes ); >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 31192
:
137896
|
137903
|
137926