From: Joey Hess Date: Sat, 5 Jan 2008 06:47:04 +0000 (-0500) Subject: fix an uninitialised value warning X-Git-Tag: 2.18~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1fb1d6c1830a3d80bd6940bc2b24ca4f673e1bed;p=ikiwiki.git fix an uninitialised value warning --- diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index 35c62ce3e..1522feb1e 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -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}); }