Bugzilla – Attachment 29683 Details for
Bug 12573
blinddetail-biblio-search uses wrong comparison operator
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
0001-Bug-12573-Use-correct-comparison-for-comparing-strin.patch (text/plain), 1.35 KB, created by
Colin Campbell
on 2014-07-14 15:38:45 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Colin Campbell
Created:
2014-07-14 15:38:45 UTC
Size:
1.35 KB
patch
obsolete
>From d79be06a8cf9f0de4a71f15bcd64f1b1e72f0665 Mon Sep 17 00:00:00 2001 >From: Colin Campbell <colin.campbell@ptfs-europe.com> >Date: Mon, 14 Jul 2014 16:28:27 +0100 >Subject: [PATCH] Bug 12573: Use correct comparison for comparing strings > >Perl issues a warning when you try to do a numeric comparison on >non numeric values. While in 99% of the caeses numeric and string >comparison behave similarly when they dont tracking down resulting >bugs is hard. Also we dont want to be logging errors for normal >operations. replace numeric == with eq >(also switched to non-interpolating quotes so we dont generate >a warning from static code checkers like perlcritic) >--- > authorities/blinddetail-biblio-search.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/authorities/blinddetail-biblio-search.pl b/authorities/blinddetail-biblio-search.pl >index c6a3042..16732c8 100755 >--- a/authorities/blinddetail-biblio-search.pl >+++ b/authorities/blinddetail-biblio-search.pl >@@ -86,7 +86,7 @@ if ($authid) { > # Get all values for each distinct subfield > my %subfields; > for ( $field->subfields ) { >- next if $_->[0] == "9"; # $9 will be set with authid value >+ next if $_->[0] eq '9'; # $9 will be set with authid value > my $letter = $_->[0]; > next if defined $subfields{$letter}; > my @values = $field->subfield($letter); >-- >1.9.3 >
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 12573
:
29683
|
32769
|
32771