Skip to content

Commit

Permalink
Merge pull request #59 from cato-cit/default-is-not-idp
Browse files Browse the repository at this point in the history
Fix #58, #55: Database connection is not defined if default site is not IDP
  • Loading branch information
RoSk0 authored Mar 27, 2020
2 parents 89be9d0 + 6244810 commit f6c1f5d
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/DrupalHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,7 @@ class DrupalHelper
public function bootDrupal($drupalRoot)
{
$autoloader = require_once $drupalRoot . '/autoload.php';
// Inherit the current request's HTTP host to respect trusted hosts
// settings.
$current_request = Request::createFromGlobals();
$server = [
'HTTP_HOST' => $current_request->getHost(),
];
$request = new Request([], [], [], [], [], $server);
$request = Request::createFromGlobals();
$originalDir = getcwd();
chdir($drupalRoot);
$kernel = DrupalKernel::createFromRequest($request, $autoloader, 'prod', true, $drupalRoot);
Expand Down

0 comments on commit f6c1f5d

Please sign in to comment.