1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[feature/controller] Fix comments, check against more general HttpException

PHPBB3-10864
This commit is contained in:
David King
2012-11-19 12:55:15 -05:00
parent f8614bfc84
commit 01ec608593
2 changed files with 6 additions and 5 deletions

View File

@@ -18,7 +18,7 @@ if (!defined('IN_PHPBB'))
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpFoundation\Response;
class phpbb_event_kernel_exception_subscriber implements EventSubscriberInterface
@@ -71,7 +71,7 @@ class phpbb_event_kernel_exception_subscriber implements EventSubscriberInterfac
page_footer(true, false, false);
$status_code = $exception instanceof NotFoundHttpException ? $exception->getStatusCode() : 500;
$status_code = $exception instanceof HttpException ? $exception->getStatusCode() : 500;
$response = new Response($this->template->assign_display('body'), $status_code);
$event->setResponse($response);
}