Register the request object in the installer so that the utility functions that now depend on it work.

8.0.x
Larry Garfield 2012-03-31 20:08:15 -05:00
parent 7b12ed6f8b
commit 674dae32c7
1 changed files with 10 additions and 0 deletions

View File

@ -3,6 +3,8 @@
use Drupal\Core\Database\Database;
use Drupal\Core\Database\Install\TaskException;
use Symfony\Component\HttpFoundation\Request;
/**
* @file
* API functions for installing Drupal.
@ -261,6 +263,14 @@ function install_begin_request(&$install_state) {
drupal_bootstrap(DRUPAL_BOOTSTRAP_CONFIGURATION);
// A request object from the HTTPFoundation to tell us about the request.
$request = Request::createFromGlobals();
// Set the global $request object. This is a temporary measure to
// keep legacy utility functions working. It should be moved to a dependency
// injection container at some point.
request($request);
// This must go after drupal_bootstrap(), which unsets globals!
global $conf;