Index: bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.122
diff -u -r1.122 bootstrap.inc
--- bootstrap.inc	1 Sep 2006 08:44:53 -0000	1.122
+++ bootstrap.inc	1 Sep 2006 11:49:55 -0000
@@ -664,10 +664,11 @@
  */
 function drupal_bootstrap($phase) {
   static $phases = array(DRUPAL_BOOTSTRAP_CONFIGURATION, DRUPAL_BOOTSTRAP_EARLY_PAGE_CACHE, DRUPAL_BOOTSTRAP_DATABASE, DRUPAL_BOOTSTRAP_SESSION, DRUPAL_BOOTSTRAP_LATE_PAGE_CACHE, DRUPAL_BOOTSTRAP_PATH, DRUPAL_BOOTSTRAP_FULL);
-
-  while (!is_null($current_phase = array_shift($phases))) {
-    _drupal_bootstrap($current_phase);
-    if ($phase == $current_phase) {
+  global $bootstrap_phase;
+  
+  while (!is_null($bootstrap_phase = array_shift($phases))) {
+    _drupal_bootstrap($bootstrap_phase);
+    if ($phase == $bootstrap_phase) {
       return;
     }
   }
