diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index 757ac2a..8de7c52 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -2037,7 +2037,7 @@ function language_default() { * @see current_path() */ function request_path(Request $request = NULL) { - DrupalKernel::requestPath($request); + return DrupalKernel::requestPath($request); } /** diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php index 79017a1..dad2142 100644 --- a/core/lib/Drupal/Core/DrupalKernel.php +++ b/core/lib/Drupal/Core/DrupalKernel.php @@ -256,6 +256,7 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface { * Defaults to FALSE. */ public function __construct($environment, ClassLoader $class_loader = NULL, $allow_dumping = TRUE, $test_only = FALSE) { + $this->environment = $environment; $this->allowDumping = $allow_dumping; $this->testOnly = $test_only; if ($class_loader) { @@ -474,7 +475,7 @@ public static function requestPath(Request $request = NULL) { static::$requestPath = ''; } elseif (strpos(static::$requestPath, $script . '/') === 0) { - $path = substr(static::$requestPath, strlen($script) + 1); + static::$requestPath = substr(static::$requestPath, strlen($script) + 1); } // Extra slashes can appear in URLs or under some conditions, added by