]> sipb.mit.edu Git - ikiwiki.git/commitdiff
checkconfig: don't warn if $config{url} is undef
authorSimon McVittie <smcv@debian.org>
Tue, 21 Dec 2010 14:21:53 +0000 (14:21 +0000)
committerSimon McVittie <smcv@debian.org>
Sat, 25 Dec 2010 21:35:06 +0000 (21:35 +0000)
The warning was "Use of uninitialized value $IkiWiki::config{"url"} in
length" when running a modified t/tag.t.

IkiWiki.pm

index 926d42a497159845ae8ab94c62a054374a61d468..93d2c326d300209cf8f6af51905ec34bccd80b64 100644 (file)
@@ -544,7 +544,7 @@ sub checkconfig () {
                error(gettext("Must specify url to wiki with --url when using --cgi"));
        }
 
                error(gettext("Must specify url to wiki with --url when using --cgi"));
        }
 
-       if (length $config{url}) {
+       if (defined $config{url} && length $config{url}) {
                eval q{use URI};
                my $baseurl = URI->new($config{url});
 
                eval q{use URI};
                my $baseurl = URI->new($config{url});