Skip to content

Commit

Permalink
fix bug not exist method get into container
Browse files Browse the repository at this point in the history
  • Loading branch information
ssanmartin00 committed Dec 17, 2024
1 parent 95448aa commit 75d9d5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Controller/ThreadController.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ public function getThreadCommentsAction(Request $request, string $id): Response
$thread->setPermalink($permalink);

// Validate the entity
$errors = $this->get('validator')->validate($thread, null, ['NewThread']);
$errors = $this->container->get('core.validator')->validate($thread, null, ['NewThread']);
if (count($errors) > 0) {
$view = View::create()
->setStatusCode(Response::HTTP_BAD_REQUEST)
Expand Down Expand Up @@ -410,7 +410,7 @@ public function getThreadCommentsAction(Request $request, string $id): Response
return new Response($handler->renderTemplate($view, 'rss'), Response::HTTP_OK, $view->getHeaders());
};

$this->get('fos_rest.view_handler')->registerHandler('rss', $templatingHandler);
$this->container->get('fos_rest.view_handler')->registerHandler('rss', $templatingHandler);
}

return $this->handleView($view);
Expand Down

0 comments on commit 75d9d5a

Please sign in to comment.