]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/404.pm
Code deduplication fin find_src_files()
[git.ikiwiki.info.git] / IkiWiki / Plugin / 404.pm
index 5550ea7d19dda10131344385358b65e6ed3bb81e..85486e559b0cdfa907d3000ed8f64a3a281d2d69 100644 (file)
@@ -67,8 +67,10 @@ sub cgi_page_from_404 ($$$) {
 sub cgi ($) {
        my $cgi=shift;
 
-       if ($ENV{REDIRECT_STATUS} eq '404') {
-               my $page = cgi_page_from_404($ENV{REDIRECT_URL},
+       if (exists $ENV{REDIRECT_STATUS} && 
+           $ENV{REDIRECT_STATUS} eq '404') {
+               my $page = cgi_page_from_404(
+                       Encode::decode_utf8($ENV{REDIRECT_URL}),
                        $config{url}, $config{usedirs});
                IkiWiki::Plugin::goto::cgi_goto($cgi, $page);
        }