diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 80563ef..4367555 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -2322,6 +2322,11 @@ function _drupal_bootstrap_page_cache() { // Make sure there is a user object because its timestamp will be // checked, hook_boot might check for anonymous user etc. $user = drupal_anonymous_user(); + // If the skipping of the bootstrap hooks is not enforced, call + // hook_boot. + if (variable_get('page_cache_invoke_hooks', TRUE)) { + bootstrap_invoke_all('boot'); + } // Get the page from the cache. $cache = drupal_page_get_cache(); // If there is a cached page, display it. @@ -2331,11 +2336,6 @@ function _drupal_bootstrap_page_cache() { $_GET['q'] = $cache->data['path']; drupal_set_title($cache->data['title'], PASS_THROUGH); date_default_timezone_set(drupal_get_user_timezone()); - // If the skipping of the bootstrap hooks is not enforced, call - // hook_boot. - if (variable_get('page_cache_invoke_hooks', TRUE)) { - bootstrap_invoke_all('boot'); - } drupal_serve_page_from_cache($cache); // If the skipping of the bootstrap hooks is not enforced, call // hook_exit.