summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2012-11-04 14:18:03 -0500
committerDavid Rothstein <drothstein@gmail.com>2012-11-04 14:18:03 -0500
commit577bfdc670c59e4f8e5ac3e2bdcf994e897f4f79 (patch)
treeaef186141e1696df4c62758d36dc0830de16e999 /includes
parent8355498584c27d1855c2411a2d58dd4c13fb455b (diff)
downloadbrdo-577bfdc670c59e4f8e5ac3e2bdcf994e897f4f79.tar.gz
brdo-577bfdc670c59e4f8e5ac3e2bdcf994e897f4f79.tar.bz2
Issue #1414510 by andypost, Spleshka, perelman.yuval, tim.plunkett: Fixed Remove drupal_reset_static() for drupal_html_id() when form validation fails.
Diffstat (limited to 'includes')
-rw-r--r--includes/form.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/includes/form.inc b/includes/form.inc
index 826b6777b..fa49839e4 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -850,7 +850,10 @@ function drupal_process_form($form_id, &$form, &$form_state) {
// cache when a form is processed, so scenarios that result in
// the form being built behind the scenes and again for the
// browser don't increment all the element IDs needlessly.
- drupal_static_reset('drupal_html_id');
+ if (!form_get_errors()) {
+ // In case of errors, do not break HTML IDs of other forms.
+ drupal_static_reset('drupal_html_id');
+ }
if ($form_state['submitted'] && !form_get_errors() && !$form_state['rebuild']) {
// Execute form submit handlers.