summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-09-01 17:03:31 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-09-01 17:03:31 +0000
commit5bd9dcef6000760c11b649cc6096b4b0352162a1 (patch)
tree08e9b629e5d95489eea54615c3edc58408dc4ea0
parentff813ab62ca142f5c892846e56eb9044ffedd822 (diff)
downloadbrdo-5bd9dcef6000760c11b649cc6096b4b0352162a1.tar.gz
brdo-5bd9dcef6000760c11b649cc6096b4b0352162a1.tar.bz2
#557582 by moshe weitzman: Reset statics after each update to conserve memory and avoid odd bugs.
-rw-r--r--includes/update.inc2
1 files changed, 2 insertions, 0 deletions
diff --git a/includes/update.inc b/includes/update.inc
index 4878e7db6..439864311 100644
--- a/includes/update.inc
+++ b/includes/update.inc
@@ -410,6 +410,8 @@ function update_do_one($module, $number, &$context) {
// Record the schema update if it was completed successfully.
if ($context['finished'] == 1 && empty($context['results'][$module]['#abort'])) {
drupal_set_installed_schema_version($module, $number);
+ // Conserve memory and avoid errors by resetting all static variables.
+ drupal_static_reset();
}
$context['message'] = 'Updating ' . check_plain($module) . ' module';