Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
a3c710bb
Commit
a3c710bb
authored
Sep 23, 2013
by
Byron Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 918647: "Use of uninitialized value" warnings when using quicksearch
r=simon, a=glob
parent
9daa109f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
Quicksearch.pm
Bugzilla/Search/Quicksearch.pm
+5
-1
No files found.
Bugzilla/Search/Quicksearch.pm
View file @
a3c710bb
...
@@ -196,6 +196,7 @@ sub quicksearch {
...
@@ -196,6 +196,7 @@ sub quicksearch {
foreach
my
$qsword
(
@qswords
)
{
foreach
my
$qsword
(
@qswords
)
{
my
@or_operand
=
_parse_line
(
'\|'
,
1
,
$qsword
);
my
@or_operand
=
_parse_line
(
'\|'
,
1
,
$qsword
);
foreach
my
$term
(
@or_operand
)
{
foreach
my
$term
(
@or_operand
)
{
next
unless
defined
$term
;
my
$negate
=
substr
(
$term
,
0
,
1
)
eq
'-'
;
my
$negate
=
substr
(
$term
,
0
,
1
)
eq
'-'
;
if
(
$negate
)
{
if
(
$negate
)
{
$term
=
substr
(
$term
,
1
);
$term
=
substr
(
$term
,
1
);
...
@@ -262,6 +263,8 @@ sub quicksearch {
...
@@ -262,6 +263,8 @@ sub quicksearch {
sub
_parse_line
{
sub
_parse_line
{
my
(
$delim
,
$keep
,
$line
)
=
@_
;
my
(
$delim
,
$keep
,
$line
)
=
@_
;
return
()
unless
defined
$line
;
# parse_line always treats ' as a quote character, making it impossible
# parse_line always treats ' as a quote character, making it impossible
# to sanely search for contractions. As this behavour isn't
# to sanely search for contractions. As this behavour isn't
# configurable, we replace ' with a placeholder to hide it from the
# configurable, we replace ' with a placeholder to hide it from the
...
@@ -276,7 +279,7 @@ sub _parse_line {
...
@@ -276,7 +279,7 @@ sub _parse_line {
my @words = parse_line($delim, $keep, $line);
my @words = parse_line($delim, $keep, $line);
foreach my $word (@words) {
foreach my $word (@words) {
$word =~ tr/\000/'
/
;
$word =~ tr/\000/'
/
if
defined
$word
;
}
}
return
@words
;
return
@words
;
}
}
...
@@ -348,6 +351,7 @@ sub _handle_status_and_resolution {
...
@@ -348,6 +351,7 @@ sub _handle_status_and_resolution {
sub
_handle_special_first_chars
{
sub
_handle_special_first_chars
{
my
(
$qsword
,
$negate
)
=
@_
;
my
(
$qsword
,
$negate
)
=
@_
;
return
0
if
!
defined
$qsword
||
length
(
$qsword
)
<=
1
;
my
$firstChar
=
substr
(
$qsword
,
0
,
1
);
my
$firstChar
=
substr
(
$qsword
,
0
,
1
);
my
$baseWord
=
substr
(
$qsword
,
1
);
my
$baseWord
=
substr
(
$qsword
,
1
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment