--- captcha.module.orig	2008-08-30 03:20:18.000000000 +0200
+++ captcha.module	2008-10-26 21:48:14.000000000 +0100
@@ -336,11 +336,11 @@ function captcha_validate($form, &$form_
     $captcha_response = module_invoke($captcha_info['module'], 'captcha', 'preprocess', $captcha_info['type'], $captcha_response);
   }
   $form_id = $captcha_info['form_id'];
-  // not that we use $form_state['clicked_button']['#post']['captcha_token']
+  // note that we use $form_state['clicked_button']['#post']['captcha_token']
   // here instead of $form_state['values']['captcha_token'], because the latter
   // contains the captcha_token of the new form, while the former contains
   // the captcha token of the posted form.
-  $captcha_token = $form_state['clicked_button']['#post']['captcha_token'];
+  $captcha_token = isset($form_state['clicked_button']['#post']['captcha_token']) ? $form_state['clicked_button']['#post']['captcha_token'] : '';
   // Check if captcha_token exists
   if (!isset($_SESSION['captcha'][$form_id][$captcha_token])) {
     form_set_error('captcha_token', t('Invalid CAPTCHA token.'));
@@ -358,8 +358,9 @@ function captcha_validate($form, &$form_
     // log to watchdog if needed
     if (variable_get('captcha_log_wrong_responses', FALSE)) {
       watchdog('CAPTCHA',
-        '%form_id post blocked by CAPTCHA module: challenge "%challenge" (by module "%module"), user answered "%response", but the solution was "%solution".',
+        '%form_id post blocked by CAPTCHA module: challenge "%challenge" (by module "%module"), user answered "%response", but the solution was "%solution". The submitted form_state was !form_state',
         array('%form_id' => $form_id,
+          '!form_state' => '<pre>'. check_plain(print_r($form_state, TRUE)) .'</pre>',
           '%response' => $captcha_response, '%solution' => $_SESSION['captcha'][$form_id][$captcha_token],
           '%challenge' => $captcha_info['type'], '%module' => $captcha_info['module'],
         ),
--- captcha.install.orig	2008-10-26 21:47:39.000000000 +0100
+++ captcha.install	2008-09-10 16:17:59.000000000 +0200
@@ -33,7 +33,7 @@ function captcha_install() {
   drupal_install_schema('captcha');
 
   // insert some defaults
-  $form_ids = array('comment_form', 'contact_mail_user', 'contact_mail_page',
+  $form_ids = array('comment_form', 'contact_mail_user', 'contact_mail_page', 'print_mail_form',
     'user_register', 'user_pass', 'user_login', 'user_login_block');
   foreach ($form_ids as $form_id) {
     db_query("INSERT INTO {captcha_points} (form_id, module, type) VALUES ('%s', NULL, NULL)", $form_id);
@@ -85,7 +85,7 @@ function captcha_update_1() {
   }
   if ($succes) {
     // insert some defaults
-    $form_ids = array('comment_form', 'contact_mail_user', 'contact_mail_page',
+    $form_ids = array('comment_form', 'contact_mail_user', 'contact_mail_page', 'print_mail_form',
       'user_register', 'user_pass');
     foreach ($form_ids as $form_id) {
       $items[] = update_sql("INSERT INTO {captcha_points} (form_id, module, type) VALUES ('$form_id', NULL, NULL)");
