avoid uninitialized value warnings

master
Joey Hess 2009-03-09 13:52:51 -04:00
parent 10872b91af
commit 793e9332c3
1 changed files with 2 additions and 1 deletions

View File

@ -67,7 +67,8 @@ sub cgi_page_from_404 ($$$) {
sub cgi ($) {
my $cgi=shift;
if ($ENV{REDIRECT_STATUS} eq '404') {
if (exists $ENV{REDIRECT_STATUS} &&
$ENV{REDIRECT_STATUS} eq '404') {
my $page = cgi_page_from_404($ENV{REDIRECT_URL},
$config{url}, $config{usedirs});
IkiWiki::Plugin::goto::cgi_goto($cgi, $page);