From f8e189ede7dc619ea70d6156bfa50456dba8e33a Mon Sep 17 00:00:00 2001 From: Katherine Bailey <katherine@katbailey.net> Date: Sun, 22 Jul 2012 19:28:36 -0700 Subject: [PATCH] Temporary fix to prevent fatal error on language upgrade test --- core/includes/update.inc | 9 +++++++++ core/update.php | 8 -------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/core/includes/update.inc b/core/includes/update.inc index 5aff2bcdacde..1a1d7f646152 100644 --- a/core/includes/update.inc +++ b/core/includes/update.inc @@ -255,6 +255,15 @@ function update_prepare_d8_language() { // array. variable_set('language_default', (array) $language_default); } + else { + variable_set('language_default', array( + 'langcode' => 'en', + 'name' => 'English', + 'direction' => 0, + 'weight' => 0, + 'locked' => 0, + )); + } // Adds the locked column and saves the special languages. if (!db_field_exists('language', 'locked')) { diff --git a/core/update.php b/core/update.php index 85c45c0d8fff..b68533209ba9 100644 --- a/core/update.php +++ b/core/update.php @@ -383,18 +383,10 @@ function update_check_requirements($skip_warnings = FALSE) { // Determine if the current user has access to run update.php. drupal_bootstrap(DRUPAL_BOOTSTRAP_SESSION); - -// Ensure the default language is properly registered within the Dependency -// Injection container during the upgrade process. -$default = language_default(); -drupal_container()->register(LANGUAGE_TYPE_INTERFACE, 'Drupal\\Core\\Language\\Language') - ->addMethodCall('extend', array($default)); - // A request object from the HTTPFoundation to tell us about the request. // @todo These two lines were copied from index.php which has its own todo about // a change required here. Revisit this when that change has been made. $request = Request::createFromGlobals(); -request($request); // There can be conflicting 'op' parameters because both update and batch use // this parameter name. We need the 'op' coming from a POST request to trump -- GitLab