From f8eedefcba23855fe8f126824bd62e4479e7fbcc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= <gabor@hojtsy.hu>
Date: Tue, 11 May 2010 08:13:38 +0000
Subject: [PATCH] #732064 follow up by pwolanin: move lock system loading
 earlier to avoid stepping over it or attempting to use it before it is loaded

---
 includes/bootstrap.inc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index 0f6d4967132b..01cccd6e1019 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -1020,6 +1020,10 @@ function _drupal_bootstrap($phase) {
       // Initialize the default database.
       require_once './includes/database.inc';
       db_set_active();
+      // Allow specifying alternate lock implementations in settings.php, like
+      // those using APC or memcached.
+      require_once variable_get('lock_inc', './includes/lock.inc');
+      lock_init();
       break;
 
     case DRUPAL_BOOTSTRAP_ACCESS:
@@ -1060,8 +1064,6 @@ function _drupal_bootstrap($phase) {
         exit;
       }
       // Prepare for non-cached page workflow.
-      require_once variable_get('lock_inc', './includes/lock.inc');
-      lock_init();
       drupal_page_header();
       break;
 
-- 
GitLab