diff options
Diffstat (limited to 'IkiWiki/Plugin/goto.pm')
-rw-r--r-- | IkiWiki/Plugin/goto.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/goto.pm b/IkiWiki/Plugin/goto.pm index 42d2425ca..0eb83fc20 100644 --- a/IkiWiki/Plugin/goto.pm +++ b/IkiWiki/Plugin/goto.pm @@ -52,7 +52,7 @@ sub cgi_goto ($;$) { IkiWiki::redirect($q, $pagestate{$page}{meta}{permalink}); } - if (! length $link) { + if (! defined $link || ! length $link) { IkiWiki::cgi_custom_failure( $q, "404 Not Found", @@ -64,7 +64,7 @@ sub cgi_goto ($;$) { ) } else { - IkiWiki::redirect($q, urlto($link, undef, 1)); + IkiWiki::redirect($q, urlto($link)); } exit; |