]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/CGI.pm
git: Do not disable commit hook for temporary working tree
[git.ikiwiki.info.git] / IkiWiki / CGI.pm
index b6923b54f89e55e0878977fdc906d849baa81e9f..878869ef1e43888183746f2e7db4b7eda53f538c 100644 (file)
@@ -277,8 +277,9 @@ sub cgi_prefs ($$) {
                return;
        }
        elsif ($form->submitted eq 'Save Preferences' && $form->validate) {
                return;
        }
        elsif ($form->submitted eq 'Save Preferences' && $form->validate) {
-               if (defined $form->field('email')) {
-                       userinfo_set($user_name, 'email', $form->field('email')) ||
+               my $email = $form->field('email');
+               if (defined $email) {
+                       userinfo_set($user_name, 'email', $email) ||
                                error("failed to set email");
                }
 
                                error("failed to set email");
                }