Bugzilla – Attachment 24958 Details for
Bug 11182
Warnings in circulation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11182: (QA followup) warning if itemBarcodeFallbackSearch set
Bug-11182-QA-followup-warning-if-itemBarcodeFallba.patch (text/plain), 1.73 KB, created by
Tomás Cohen Arazi (tcohen)
on 2014-01-31 16:08:05 UTC
(
hide
)
Description:
Bug 11182: (QA followup) warning if itemBarcodeFallbackSearch set
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2014-01-31 16:08:05 UTC
Size:
1.73 KB
patch
obsolete
>From e726250f576e4be9135e9d6ac099b97f9781dd09 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Fri, 31 Jan 2014 13:00:18 -0300 >Subject: [PATCH] Bug 11182: (QA followup) warning if itemBarcodeFallbackSearch > set > >To reproduce: >- On top of the previous patches, if you enable the itemBarcodeFallbackSearch > syspref and do a search for a term that returns at least one result, there > will be warnings for each result without items attached. > >To test: > >- In the checkout form enter a term that should return results (some of them > without items attached) >=> There are warnings on the logs regarding a split of undef variable >- Apply the patch >- Repeat the first step >=> No warings >--- > circ/circulation.pl | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 2ee91b9..396515a 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -312,10 +312,12 @@ if ($barcode) { > MARC::Record->new_from_usmarc($hit) ); > > # offer all barcodes individually >- foreach my $barcode ( sort split(/\s*\|\s*/, $chosen->{barcode}) ) { >- my %chosen_single = %{$chosen}; >- $chosen_single{barcode} = $barcode; >- push( @options, \%chosen_single ); >+ if ( $chosen->{barcode} ) { >+ foreach my $barcode ( sort split(/\s*\|\s*/, $chosen->{barcode}) ) { >+ my %chosen_single = %{$chosen}; >+ $chosen_single{barcode} = $barcode; >+ push( @options, \%chosen_single ); >+ } > } > } > $template->param( options => \@options ); >-- >1.8.3.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 11182
:
22662
|
22864
|
22865
|
24171
|
24179
|
24181
|
24196
|
24198
|
24209
|
24516
|
24517
|
24518
|
24519
|
24520
|
24522
|
24523
|
24524
|
24955
|
24956
|
24957
| 24958