From 5bd9dcef6000760c11b649cc6096b4b0352162a1 Mon Sep 17 00:00:00 2001
From: Angie Byron <webchick@24967.no-reply.drupal.org>
Date: Tue, 1 Sep 2009 17:03:31 +0000
Subject: [PATCH] #557582 by moshe weitzman: Reset statics after each update to
 conserve memory and avoid odd bugs.

---
 includes/update.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/includes/update.inc b/includes/update.inc
index 4878e7db64f7..4398643114b7 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';
-- 
GitLab