Bug when domain setup w/o site_name variable set
Brock Rozen <[email protected]> Fri, 7 Jul 2006 15:45:03 +0300 (IDT)
| Newsgroups | gmane.mail.majordomo.majordomo2.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I'm getting this error when I type in "lists" in a domain that doesn't
have the site_name config setting set in the GLOBAL list:
--== Use of uninitialized value in sprintf at blib/lib/Majordomo.pm
(autosplit into
blib/lib/auto/Majordomo/substitute_vars_format.al) line 1236.
The relevant code, as I can see it, is this:
# empty value: mark for line-by-line processing
else {
while ($str =~ /([^\\]|^)\$\Q$i\E(:-?\d+)?(?![A-Z_])/m) {
$value = defined $2 ? "%$2s" : "%s";
$value =~ s/://;
$line = sprintf $value, $subs->{$i};
$str =~ s/([^\\]|^)\$\Q$i\E(:-?\d+)?(?![A-Z_])/$1$line/m;
}
next unless ($str =~ /([^\\]|^)(\?)\Q$i\E(:-?\d+)?(?![A-Z_])/m);
$subcount{$i} = 1;
}
When I set that variable -- the error goes away.
I'll also take this opportunity to suggest that the default setting for
this variable should be the FQDN itself.
Best,
--
Brock Rozen [email protected]