From: Thomas Hochstein Date: Wed, 4 Sep 2013 08:39:40 +0000 (+0200) Subject: Fix ea91003a99e679caa5bf56915f085a7c4931805b. X-Git-Url: https://code.th-h.de/?p=usenet%2Fnewsstats.git;a=commitdiff_plain;h=22d3d70a7285bd0730d301609da05ab09ef640e5 Fix ea91003a99e679caa5bf56915f085a7c4931805b. Commit ea91003a99e679caa5bf56915f085a7c4931805b was broken and did not check for undefined variables. Signed-off-by: Thomas Hochstein --- diff --git a/bin/groupstats.pl b/bin/groupstats.pl index 7f3a32c..b96a9d6 100755 --- a/bin/groupstats.pl +++ b/bin/groupstats.pl @@ -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);