diff options
author | Joey Hess <joey@kitenet.net> | 2011-02-27 18:32:44 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-02-27 18:32:44 -0400 |
commit | 2a2ae88c84da1793fc927b527927fe1c5ae6a7d6 (patch) | |
tree | 774f4b82d00776e8591ba7244ed0e471f6b5bd7c /IkiWiki.pm | |
parent | b34d31142b9fed28ec9cf77fe0c5d9f405d48c84 (diff) | |
download | ikiwiki-2a2ae88c84da1793fc927b527927fe1c5ae6a7d6.tar ikiwiki-2a2ae88c84da1793fc927b527927fe1c5ae6a7d6.tar.gz |
avoid uninitlized value when urlto is called with 1 parameter and no url is configured
This brings back the old behavior before urlto changes for this case.
It will generate a path like "/foo", which is not right, but is
the same as is generated by urlto($page, "", 1) -- which is what
the code that now uses 1-parameter urlto used to use.
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r-- | IkiWiki.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm index 7d1f5c401..9de25a4b3 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1168,7 +1168,7 @@ sub urlto ($;$$) { } if (! defined $from) { - my $u = $local_url; + my $u = $local_url || ''; $u =~ s{/$}{}; return $u.beautify_urlpath("/".$to); } |