diff options
Diffstat (limited to 'includes/bootstrap.inc')
-rw-r--r-- | includes/bootstrap.inc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index e1b28aca7..6683371cd 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -852,6 +852,11 @@ function drupal_anonymous_user($session = '') { function drupal_bootstrap($phase) { static $phases = array(DRUPAL_BOOTSTRAP_CONFIGURATION, DRUPAL_BOOTSTRAP_EARLY_PAGE_CACHE, DRUPAL_BOOTSTRAP_DATABASE, DRUPAL_BOOTSTRAP_ACCESS, DRUPAL_BOOTSTRAP_SESSION, DRUPAL_BOOTSTRAP_LATE_PAGE_CACHE, DRUPAL_BOOTSTRAP_LANGUAGE, DRUPAL_BOOTSTRAP_PATH, DRUPAL_BOOTSTRAP_FULL); + // Stop early if $phase was already executed. + if (!in_array($phase, $phases)) { + return; + } + while (!is_null($current_phase = array_shift($phases))) { _drupal_bootstrap($current_phase); if ($phase == $current_phase) { |