]> ruin.nu Git - ndwebbie.git/blobdiff - ND.pm
bugfix
[ndwebbie.git] / ND.pm
diff --git a/ND.pm b/ND.pm
index dd017f3a4201c73c8a579373ace4d9446e0d1eb1..3c053b853e66606e9d72c3573122deab9b4bef7d 100755 (executable)
--- a/ND.pm
+++ b/ND.pm
@@ -52,7 +52,7 @@ sub handler {
        if ($ENV{'SCRIPT_NAME'} =~ /(\w+)(\.(pl|php|pm))?$/){
                $ND::PAGE = $1 unless $1 eq 'index' and $3 eq 'pl';
        }
-       $ND::PAGE = 'main' unless exists $PAGES{$ND::PAGE};
+       $ND::PAGE = 'main' unless (defined $ND::PAGE and exists $PAGES{$ND::PAGE});
 
        $PAGES{$ND::PAGE}->{parse}->($ENV{REQUEST_URI});