fix another undef/"" confusion
authorJoey Hess <joey@kitenet.net>
Wed, 28 Mar 2012 20:47:37 +0000 (16:47 -0400)
committerJoey Hess <joey@kitenet.net>
Wed, 28 Mar 2012 20:47:37 +0000 (16:47 -0400)
IkiWiki/Plugin/passwordauth.pm

index 35ebd961f53e8da8e2a012d970f8d309d135a307..c167f52b5c2d11586325cfc1d51a9a3825614f9e 100644 (file)
@@ -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'));
                        }
                }