Bugzilla – Attachment 97159 Details for
Bug 24367
With strict enabled, Search.t is too verbose
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24367: Resolve warn Use of uninitialized value within [arrays]
Bug-24367-Resolve-warn-Use-of-uninitialized-value-.patch (text/plain), 1.38 KB, created by
Marcel de Rooy
on 2020-01-10 08:30:59 UTC
(
hide
)
Description:
Bug 24367: Resolve warn Use of uninitialized value within [arrays]
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2020-01-10 08:30:59 UTC
Size:
1.38 KB
patch
obsolete
>From 293feb158284469a1dd14240fab68da08ed6f68a Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 10 Jan 2020 08:27:39 +0000 >Subject: [PATCH] Bug 24367: Resolve warn Use of uninitialized value within > [arrays] >Content-Type: text/plain; charset=utf-8 > >Use of uninitialized value within @operators in string eq at /usr/share/koha/C4/Search.pm line 1362. >Use of uninitialized value within @indexes in pattern match (m//) at /usr/share/koha/C4/Search.pm line 1367. > >Trivial tests added. >--- > C4/Search.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index c1a21e9ce2..d1df39defb 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -1359,12 +1359,12 @@ sub parseQuery { > $query = ''; > for ( my $ii = 0 ; $ii <= @operands ; $ii++ ) { > next unless $operands[$ii]; >- $query .= $operators[ $ii - 1 ] eq 'or' ? ' || ' : ' && ' >+ $query .= $operators[$ii-1] && $operators[ $ii - 1 ] eq 'or' ? ' || ' : ' && ' > if ($query); > if ( $operands[$ii] =~ /^[^"]\W*[-|_\w]*:\w.*[^"]$/ ) { > $query .= $operands[$ii]; > } >- elsif ( $indexes[$ii] =~ m/su-/ ) { >+ elsif ( $indexes[$ii] && $indexes[$ii] =~ m/su-/ ) { > $query .= $indexes[$ii] . '(' . $operands[$ii] . ')'; > } > else { >-- >2.11.0
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 24367
:
96911
|
97096
|
97097
|
97157
|
97158
| 97159 |
97163
|
99113