summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/simpletest/tests/upgrade/drupal-6.bare.database.php4
-rw-r--r--update.php9
2 files changed, 11 insertions, 2 deletions
diff --git a/modules/simpletest/tests/upgrade/drupal-6.bare.database.php b/modules/simpletest/tests/upgrade/drupal-6.bare.database.php
index 7e78e1b99..9188fdab3 100644
--- a/modules/simpletest/tests/upgrade/drupal-6.bare.database.php
+++ b/modules/simpletest/tests/upgrade/drupal-6.bare.database.php
@@ -7902,7 +7902,7 @@ db_insert('users')->fields(array(
'access' => '0',
'login' => '0',
'status' => '0',
- 'timezone' => NULL,
+ 'timezone' => '-21600',
'language' => '',
'picture' => '',
'init' => '',
@@ -7923,7 +7923,7 @@ db_insert('users')->fields(array(
'access' => '1277671612',
'login' => '1277671612',
'status' => '1',
- 'timezone' => NULL,
+ 'timezone' => '-21600',
'language' => '',
'picture' => '',
'init' => 'admin@example.com',
diff --git a/update.php b/update.php
index 4c81955fd..cea987f93 100644
--- a/update.php
+++ b/update.php
@@ -349,9 +349,18 @@ require_once DRUPAL_ROOT . '/includes/entity.inc';
require_once DRUPAL_ROOT . '/includes/unicode.inc';
update_prepare_d7_bootstrap();
+// Temporarily disable configurable timezones so the upgrade process uses the
+// site-wide timezone. This prevents a PHP notice during session initlization
+// and before offsets have been converted in user_update_7002().
+$configurable_timezones = variable_get('configurable_timezones', 1);
+$conf['configurable_timezones'] = 0;
+
// Determine if the current user has access to run update.php.
drupal_bootstrap(DRUPAL_BOOTSTRAP_SESSION);
+// Reset configurable timezones.
+$conf['configurable_timezones'] = $configurable_timezones;
+
// Only allow the requirements check to proceed if the current user has access
// to run updates (since it may expose sensitive information about the site's
// configuration).