X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Flib%2FDrupal%2FCore%2FEventSubscriber%2FDefaultExceptionHtmlSubscriber.php;fp=web%2Fcore%2Flib%2FDrupal%2FCore%2FEventSubscriber%2FDefaultExceptionHtmlSubscriber.php;h=f168a02caddf12c99e55bbd4836a334a459f981e;hp=38cb8950d00273dfb486d48342942c078d207760;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/web/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php b/web/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php index 38cb8950d..f168a02ca 100644 --- a/web/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php +++ b/web/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php @@ -79,6 +79,18 @@ class DefaultExceptionHtmlSubscriber extends HttpExceptionSubscriberBase { return ['html']; } + /** + * Handles a 4xx error for HTML. + * + * @param \Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent $event + * The event to process. + */ + public function on4xx(GetResponseForExceptionEvent $event) { + if (($exception = $event->getException()) && $exception instanceof HttpExceptionInterface) { + $this->makeSubrequest($event, '/system/4xx', $exception->getStatusCode()); + } + } + /** * Handles a 401 error for HTML. *