Commit f8e189ed authored by katbailey's avatar katbailey
Browse files

Temporary fix to prevent fatal error on language upgrade test

parent faba05fc
......@@ -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')) {
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment