diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index caa87aa..2160893 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -2382,6 +2382,11 @@ function install_configure_form_submit($form, &$form_state) { if ($form_state['values']['update_status_module'][1]) { module_enable(array('file', 'update'), FALSE); + // The kernel has been rebuilt, so add request info again. + $container = Drupal::getContainer(); + $container->enterScope('request'); + $container->set('request', Request::createFromGlobals()); + // Add the site maintenance account's email address to the list of // addresses to be notified when updates are available, if selected. if ($form_state['values']['update_status_module'][2]) { diff --git a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php index 44e29c2..809bb2d 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php @@ -782,6 +782,10 @@ protected function setUp() { ), ); + // drupal_anonymous_user() should have a symfony request object available + // so build a testing kernel. + $this->rebuildContainer(); + // Replace the global $user session with an anonymous user to resemble a // regular installation. $user = drupal_anonymous_user();