diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 5579dbf..c8c0bab 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -141,6 +141,9 @@ function install_drupal($class_loader, $settings = array()) { // installations can send output to the browser or redirect the user to the // next page. if ($state['interactive']) { + if ($session = \Drupal::request()->getSession()) { + $session->save(); + } if ($state['parameters_changed']) { // Redirect to the correct page if the URL parameters have changed. install_goto(install_redirect_url($state)); @@ -596,8 +599,9 @@ function install_run_task($task, &$install_state) { $url = Url::fromUri('base:install.php', ['query' => $install_state['parameters'], 'script' => '']); $response = batch_process($url, clone $url); if ($response instanceof Response) { - // Save $_SESSION data from batch. - \Drupal::service('session')->save(); + if ($session = \Drupal::request()->getSession()) { + $session->save(); + } // Send the response. $response->send(); exit; @@ -1553,8 +1557,12 @@ function install_load_profile(&$install_state) { * @param $install_state * An array of information about the current installation state. */ -function install_bootstrap_full() { - \Drupal::service('session')->start(); +function install_bootstrap_full(&$install_state) { + if ($install_state['interactive']) { + $session = \Drupal::service('session'); + \Drupal::request()->setSession($session); + $session->start(); + } } /**