diff --git a/core/lib/Drupal/Core/Controller/ExceptionController.php b/core/lib/Drupal/Core/Controller/ExceptionController.php index 8515af0..442cc3e 100644 --- a/core/lib/Drupal/Core/Controller/ExceptionController.php +++ b/core/lib/Drupal/Core/Controller/ExceptionController.php @@ -92,6 +92,7 @@ public function on403Html(FlattenException $exception, Request $request) { } $subrequest = Request::create('/' . $path, 'get', array('destination' => $system_path), $request->cookies->all(), array(), $request->server->all()); + $subrequest->attributes->set('_account', $request->attributes->get('_account')); // The active trail is being statically cached from the parent request to // the subrequest, like any other static. Unfortunately that means the @@ -165,6 +166,7 @@ public function on404Html(FlattenException $exception, Request $request) { // @todo The create() method expects a slash-prefixed path, but we store a // normal system path in the site_404 variable. $subrequest = Request::create('/' . $path, 'get', array(), $request->cookies->all(), array(), $request->server->all()); + $subrequest->attributes->set('_account', $request->attributes->get('_account')); // The active trail is being statically cached from the parent request to // the subrequest, like any other static. Unfortunately that means the diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php index 4ee5df4..80e1673 100644 --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php @@ -56,6 +56,7 @@ public function onKernelException(GetResponseForExceptionEvent $event) 'exception' => FlattenException::create($exception), 'logger' => $this->logger instanceof DebugLoggerInterface ? $this->logger : null, 'format' => $request->getRequestFormat(), + '_account' => $request->attributes->get('_account'), ); $request = $request->duplicate(null, null, $attributes);