Fix ea91003a99e679caa5bf56915f085a7c4931805b.
authorThomas Hochstein <thh@inter.net>
Wed, 4 Sep 2013 08:39:40 +0000 (10:39 +0200)
committerThomas Hochstein <thh@inter.net>
Wed, 4 Sep 2013 08:53:34 +0000 (10:53 +0200)
Commit ea91003a99e679caa5bf56915f085a7c4931805b
was broken and did not check for undefined
variables.

Signed-off-by: Thomas Hochstein <thh@inter.net>
bin/groupstats.pl

index 7f3a32c..b96a9d6 100755 (executable)
@@ -140,8 +140,8 @@ $OptGroupBy = 'newsgroup' if (!$OptGroupBy and
                               $OptBoundType and $OptBoundType ne 'default');
 # default to 'newsgroup' if $OptGroupBy is not set and
 # just one newsgroup is requested, but more than one month
-$OptGroupBy = 'newsgroup' if (!$OptGroupBy and
-                              $OptMonth =~ /:/ and $OptNewsgroups !~ /[:*%]/);
+$OptGroupBy = 'newsgroup' if (!$OptGroupBy and $OptMonth and $OptMonth =~ /:/
+                              and $OptNewsgroups and $OptNewsgroups !~ /[:*%]/);
 # parse $OptGroupBy to $GroupBy, create ORDER BY clause $SQLOrderClause
 # if $OptGroupBy is still not set, SQLSortOrder() will default to 'month'
 my ($GroupBy,$SQLOrderClause) = SQLSortOrder($OptGroupBy, $OptOrderBy);
This page took 0.01201 seconds and 4 git commands to generate.