diff --git a/Controller/AdminController.php b/Controller/AdminController.php index a26ec428d2..e9b5586676 100644 --- a/Controller/AdminController.php +++ b/Controller/AdminController.php @@ -38,14 +38,14 @@ protected function initialize(Request $request) $this->config = $this->container->getParameter('easy_admin.config'); if (0 === count($this->config['entities'])) { - return $this->render('@EasyAdmin/error/no_entities.html.twig'); + return $this->render('@EasyAdmin/error/no_entities.html.twig', array(), new Response('', 404)); } if (!in_array($action = $request->get('action', 'list'), $this->allowedActions)) { return $this->render('@EasyAdmin/error/forbidden_action.html.twig', array( 'action' => $action, 'allowed_actions' => $this->allowedActions, - )); + ), new Response('', 404)); } if (null !== $entityName = $request->get('entity')) {