summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2016-01-31 19:31:59 -0500
committerDavid Rothstein <drothstein@gmail.com>2016-01-31 19:31:59 -0500
commitdd3004f88462db00e7bb28c908fd353b249ad99b (patch)
tree2e89c32c1bd0d978591882d8dc2b004813bee1d7
parent7126a14cbaa320f7250a4cd06b36d8b97c6e1c88 (diff)
downloadbrdo-dd3004f88462db00e7bb28c908fd353b249ad99b.tar.gz
brdo-dd3004f88462db00e7bb28c908fd353b249ad99b.tar.bz2
Issue #2156405 by Everett Zufelt, maximpodorov, rudiedirkx, jygastaud: Remove unnecessary static variable which can cause a Javascript error on user edit pages on multi-step forms.
-rw-r--r--modules/user/user.module7
1 files changed, 1 insertions, 6 deletions
diff --git a/modules/user/user.module b/modules/user/user.module
index afb411998..02950de3c 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -3663,12 +3663,7 @@ function user_form_process_password_confirm($element) {
);
$element['#attached']['js'][] = drupal_get_path('module', 'user') . '/user.js';
- // Ensure settings are only added once per page.
- static $already_added = FALSE;
- if (!$already_added) {
- $already_added = TRUE;
- $element['#attached']['js'][] = array('data' => $js_settings, 'type' => 'setting');
- }
+ $element['#attached']['js'][] = array('data' => $js_settings, 'type' => 'setting');
return $element;
}