Commit a4a72171 authored by Crell's avatar Crell
Browse files

Create a new Request object, don't try to clone the previous one.

parent 2e9f36b4
......@@ -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);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment