From 6e2dc2b1fd690f36365d7d0bdd18d220b0aaa524 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 6 Jul 2008 16:56:50 -0400 Subject: avoid uninitialised value --- IkiWiki/Plugin/editdiff.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'IkiWiki/Plugin/editdiff.pm') diff --git a/IkiWiki/Plugin/editdiff.pm b/IkiWiki/Plugin/editdiff.pm index d45c73e8f..9872e9686 100644 --- a/IkiWiki/Plugin/editdiff.pm +++ b/IkiWiki/Plugin/editdiff.pm @@ -46,10 +46,10 @@ sub diff ($$) { #{{{ sub formbuilder_setup { #{{{ my %params=@_; my $form=$params{form}; - my $page=$form->field("page"); - return if $form->field("do") ne "edit"; + return if defined ! $form->field("do") || $form->field("do") ne "edit"; + my $page=$form->field("page"); $page = IkiWiki::possibly_foolish_untaint($page); return unless exists $pagesources{$page}; -- cgit v1.2.3