summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2013-06-12 10:38:43 +0200
committerByron Jones <bjones@mozilla.com>2013-06-12 10:38:43 +0200
commit75645b089d19ff211dbf19007a7048c0e8f8b521 (patch)
treeded403839e76d753e99d6825a32e8232643d2393 /Bugzilla
parentb9915abd8c37fd3c48a84ab8463c9765b6e20814 (diff)
downloadbugzilla-75645b089d19ff211dbf19007a7048c0e8f8b521.tar.gz
bugzilla-75645b089d19ff211dbf19007a7048c0e8f8b521.tar.xz
Bug 882059: fix "use of uninitialized value" warnings, and ignore some errors/warnings
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Auth.pm3
-rw-r--r--Bugzilla/DB/Mysql.pm2
-rw-r--r--Bugzilla/Search/Quicksearch.pm3
-rw-r--r--Bugzilla/Sentry.pm1
4 files changed, 7 insertions, 2 deletions
diff --git a/Bugzilla/Auth.pm b/Bugzilla/Auth.pm
index ab741965a..7775a03c9 100644
--- a/Bugzilla/Auth.pm
+++ b/Bugzilla/Auth.pm
@@ -221,7 +221,8 @@ sub _handle_login_result {
# For IPv6 we'll need to use inet_pton which requires Perl 5.12.
my $n = inet_aton($address);
if ($n) {
- $address = gethostbyaddr($n, AF_INET) . " ($address)"
+ my $host = gethostbyaddr($n, AF_INET);
+ $address = "$host ($address)" if $host;
}
my $vars = {
locked_user => $user,
diff --git a/Bugzilla/DB/Mysql.pm b/Bugzilla/DB/Mysql.pm
index 9ddb46622..c430725ef 100644
--- a/Bugzilla/DB/Mysql.pm
+++ b/Bugzilla/DB/Mysql.pm
@@ -181,7 +181,7 @@ sub sql_fulltext_search {
$mode = 'IN BOOLEAN MODE';
# quote un-quoted compound words
- my @words = quotewords('[\s()]+', 'delimiters', $text);
+ my @words = grep { defined } quotewords('[\s()]+', 'delimiters', $text);
foreach my $word (@words) {
# match words that have non-word chars in the middle of them
if ($word =~ /\w\W+\w/ && $word !~ m/"/) {
diff --git a/Bugzilla/Search/Quicksearch.pm b/Bugzilla/Search/Quicksearch.pm
index 61e4a926a..48eaff8d1 100644
--- a/Bugzilla/Search/Quicksearch.pm
+++ b/Bugzilla/Search/Quicksearch.pm
@@ -214,6 +214,7 @@ sub quicksearch {
foreach my $qsword (@qswords) {
my @or_operand = parse_line('\|', 1, $qsword);
foreach my $term (@or_operand) {
+ next unless defined $term;
my $negate = substr($term, 0, 1) eq '-';
if ($negate) {
$term = substr($term, 1);
@@ -344,6 +345,7 @@ sub _handle_status_and_resolution {
sub _handle_special_first_chars {
my ($qsword, $negate) = @_;
+ return if $qsword eq '';
my $firstChar = substr($qsword, 0, 1);
my $baseWord = substr($qsword, 1);
@@ -415,6 +417,7 @@ sub _handle_field_names {
$bug_status_set = 1;
}
foreach my $value (@values) {
+ next unless defined $value;
my $operator = FIELD_OPERATOR->{$translated} || 'substring';
# If the string was quoted to protect some special
# characters such as commas and colons, we need
diff --git a/Bugzilla/Sentry.pm b/Bugzilla/Sentry.pm
index 66106f13a..e0866b27e 100644
--- a/Bugzilla/Sentry.pm
+++ b/Bugzilla/Sentry.pm
@@ -52,6 +52,7 @@ use constant CONFIG => {
qr/Could not check out .*\/cvsroot/,
qr/Unicode character \S+ is illegal/,
qr/Lost connection to MySQL server during query/,
+ qr/Call me again when you have some data to chart/,
],
# (ab)use the logger to classify error/warning types