Skip to content
Snippets Groups Projects
Commit f8e189ed authored by Katherine Bailey's avatar Katherine Bailey
Browse files

Temporary fix to prevent fatal error on language upgrade test

parent faba05fc
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment