summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2010-04-22 20:14:26 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2010-04-22 20:14:26 +0200
commitd8e899bace75e1f4bd99443baaeaebac8b819251 (patch)
treeeab287d76b54b4459aee862abe7b29eeeb8a3a35
parent7ce9b17e54a32c62d92f0c5bf2101f5451a1560c (diff)
downloadbugzilla-d8e899bace75e1f4bd99443baaeaebac8b819251.tar.gz
bugzilla-d8e899bace75e1f4bd99443baaeaebac8b819251.tar.xz
Bug 561129: Various warnings thrown by Search.pm: Perl 5.12 complains for lc(undef) and uc(undef)
r/a=mkanat
-rw-r--r--Bugzilla/Search.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm
index c1e40fd4b..91af8162d 100644
--- a/Bugzilla/Search.pm
+++ b/Bugzilla/Search.pm
@@ -398,8 +398,8 @@ sub init {
}
}
- my $chfieldfrom = trim(lc($params->param('chfieldfrom'))) || '';
- my $chfieldto = trim(lc($params->param('chfieldto'))) || '';
+ my $chfieldfrom = trim(lc($params->param('chfieldfrom') || ''));
+ my $chfieldto = trim(lc($params->param('chfieldto') || ''));
$chfieldfrom = '' if ($chfieldfrom eq 'now');
$chfieldto = '' if ($chfieldto eq 'now');
my @chfield = $params->param('chfield');
@@ -1190,8 +1190,7 @@ sub BuildOrderBy {
sub split_order_term {
my $fragment = shift;
$fragment =~ /^(.+?)(?:\s+(ASC|DESC))?$/i;
- my ($column_name, $direction) = (lc($1), uc($2));
- $direction ||= "";
+ my ($column_name, $direction) = (lc($1), uc($2 || ''));
return wantarray ? ($column_name, $direction) : $column_name;
}