fix an uninitialised value warning
authorJoey Hess <joey@kodama.kitenet.net>
Sat, 5 Jan 2008 06:47:04 +0000 (01:47 -0500)
committerJoey Hess <joey@kodama.kitenet.net>
Sat, 5 Jan 2008 06:47:04 +0000 (01:47 -0500)
IkiWiki/CGI.pm

index 35c62ce3ea1900b728b742c0ab7c7c011fef0684..1522feb1ea822ddb1896ab99a1f1910cc4d31b19 100644 (file)
@@ -353,7 +353,7 @@ sub cgi_editpage ($$) { #{{{
                if (defined $type && length $type && $hooks{htmlize}{$type}) {
                        $type=possibly_foolish_untaint($type);
                }
-               elsif (defined $from) {
+               elsif (defined $from && exists $pagesources{$from}) {
                        # favor the type of linking page
                        $type=pagetype($pagesources{$from});
                }