diff --git a/webtools/testopia/Bugzilla/Testopia/Search.pm b/webtools/testopia/Bugzilla/Testopia/Search.pm index 7ea63669225b..8bee13ab9c17 100644 --- a/webtools/testopia/Bugzilla/Testopia/Search.pm +++ b/webtools/testopia/Bugzilla/Testopia/Search.pm @@ -90,7 +90,7 @@ sub init { detaint_natural($page) if $page; $page = undef if ($cgi->param('viewall')); my $pagesize = $cgi->param('pagesize') if $cgi->param('pagesize'); - detaint_natural($pagesize); + detaint_natural($pagesize) if defined $pagesize; $pagesize ||= 25; my @specialchart; @@ -1016,10 +1016,12 @@ sub init { $t = $cgi->param($profile . "_type") || ''; if ($t eq "exact" || $t eq '') { $t = "anyexact"; - foreach my $name (split(',', $cgi->param($profile))) { - $name = trim($name); - if ($name) { - &::DBNameToIdAndCheck($name); + if ($cgi->param($profile)){ + foreach my $name (split(',', $cgi->param($profile))) { + $name = trim($name); + if ($name) { + &::DBNameToIdAndCheck($name); + } } } } diff --git a/webtools/testopia/Bugzilla/Testopia/Table.pm b/webtools/testopia/Bugzilla/Testopia/Table.pm index e2ce9fabb75a..aa3110868be5 100644 --- a/webtools/testopia/Bugzilla/Testopia/Table.pm +++ b/webtools/testopia/Bugzilla/Testopia/Table.pm @@ -400,13 +400,12 @@ sub get_page_url { } sub get_url { - my $self = shift; - my $regxp = shift; + my ($self, $regxp) = @_; my $cgi = $self->{'cgi'}; my @keys = $cgi->param; - my $qstring; + my $qstring =''; foreach my $key (@keys){ - if ($key =~ /$regxp/){ + if ((defined $regxp) && ($key =~ $regxp)){ next; } my @vals = $cgi->param($key);