From: Joey Hess <joey@kitenet.net> Date: Wed, 28 Mar 2012 20:47:37 +0000 (-0400) Subject: fix another undef/"" confusion X-Git-Tag: 3.20120419~114 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/c0e5a0f1aa10ecd3b351886b95be995f44d6d8fb fix another undef/"" confusion --- diff --git a/IkiWiki/Plugin/passwordauth.pm b/IkiWiki/Plugin/passwordauth.pm index 35ebd961f..c167f52b5 100644 --- a/IkiWiki/Plugin/passwordauth.pm +++ b/IkiWiki/Plugin/passwordauth.pm @@ -329,7 +329,7 @@ sub formbuilder (@) { elsif ($form->title eq "preferences") { if ($form->submitted eq "Save Preferences" && $form->validate) { my $user_name=$form->field('name'); - if ($form->field("password") && length $form->field("password")) { + if (defined $form->field("password") && length $form->field("password")) { setpassword($user_name, $form->field('password')); } }