From a4a721716478c240cdc4496b5ec3b75e59525053 Mon Sep 17 00:00:00 2001 From: Larry Garfield <garfield@palantir.net> Date: Fri, 16 Mar 2012 20:11:33 -0500 Subject: [PATCH] Create a new Request object, don't try to clone the previous one. --- core/lib/Drupal/Core/EventSubscriber/HtmlSubscriber.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/lib/Drupal/Core/EventSubscriber/HtmlSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/HtmlSubscriber.php index 0248cc3ce764..ecb0c08dff47 100644 --- a/core/lib/Drupal/Core/EventSubscriber/HtmlSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/HtmlSubscriber.php @@ -2,6 +2,7 @@ namespace Drupal\Core\EventSubscriber; +use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\HttpKernel\Event\GetResponseEvent; @@ -74,7 +75,7 @@ public function onNotFoundHttpException(GetResponseEvent $event) { if ($path && $path != $system_path) { // @TODO: Um, how do I specify an override URL again? Totally not clear. // Do that and sub-call the kernel rather than using meah(). - $request = $event->getRequest()->duplicate(); + $request = Request::create($path); $kernel = new DrupalKernel(); $response = $kernel->handle($request, DrupalKernel::SUB_REQUEST); -- GitLab