Skip to content

Commit

Permalink
feature #1497 Update BlogController.php (seb-jean)
Browse files Browse the repository at this point in the history
This PR was merged into the main branch.

Discussion
----------

Update BlogController.php

I replace `$request->request` by `$request->getPayload()`

References:

- https://symfony.com/blog/new-in-symfony-6-3-request-payload
- symfony/symfony-docs#19225

Commits
-------

98e366f Update BlogController.php
  • Loading branch information
javiereguiluz committed Feb 19, 2024
2 parents 54b93c3 + 98e366f commit 50ee9b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controller/Admin/BlogController.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function edit(Request $request, Post $post, EntityManagerInterface $entit
public function delete(Request $request, Post $post, EntityManagerInterface $entityManager): Response
{
/** @var string|null $token */
$token = $request->request->get('token');
$token = $request->getPayload()->get('token');

if (!$this->isCsrfTokenValid('delete', $token)) {
return $this->redirectToRoute('admin_post_index', [], Response::HTTP_SEE_OTHER);
Expand Down

0 comments on commit 50ee9b9

Please sign in to comment.