summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrocnhorse2011-11-02 22:24:49 (GMT)
committer Stefaan Lippens2011-11-02 22:25:58 (GMT)
commit2ca5d9134b246cbb587dbf68e0c0256215f76509 (patch)
treea9a8f99eeb42a4c00f03baeb3e0da9a34e3367af
parentf528630bc213fdccb3e82c16ef0fd398a1880b16 (diff)
Issue #1024370: Make sure we can use a top level form value $form_state['values']['captcha_response'], even if the form has #tree=true.
-rw-r--r--captcha.module3
1 files changed, 3 insertions, 0 deletions
diff --git a/captcha.module b/captcha.module
index 6b36605..e7996ff 100644
--- a/captcha.module
+++ b/captcha.module
@@ -269,6 +269,9 @@ function captcha_process($element, $edit, &$form_state, $complete_form) {
// Store the solution in the #captcha_info array.
$element['#captcha_info']['solution'] = $captcha['solution'];
+ // Make sure we can use a top level form value $form_state['values']['captcha_response'], even if the form has #tree=true.
+ $element['#tree'] = FALSE;
+
}
return $element;