diff --git a/core/authorize.php b/core/authorize.php index fe39394..a18d2d8 100644 --- a/core/authorize.php +++ b/core/authorize.php @@ -20,6 +20,8 @@ * @link authorize Authorized operation helper functions @endlink */ +use Symfony\Component\HttpFoundation\Request; + // Change the directory to the Drupal root. chdir('..'); @@ -68,7 +70,9 @@ function authorize_access_allowed() { // We prepare only a minimal bootstrap. This includes the database and // variables, however, so we have access to the class autoloader. drupal_bootstrap(DRUPAL_BOOTSTRAP_VARIABLES); - +// A request object from the HTTPFoundation to tell us about the request. +$request = Request::createFromGlobals(); +Drupal::getContainer()->set('request', $request); // This must go after drupal_bootstrap(), which unsets globals! global $conf;