Skip to content

Commit 50ee9b9

Browse files
committed
feature #1497 Update BlogController.php (seb-jean)
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
2 parents 54b93c3 + 98e366f commit 50ee9b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Controller/Admin/BlogController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public function edit(Request $request, Post $post, EntityManagerInterface $entit
162162
public function delete(Request $request, Post $post, EntityManagerInterface $entityManager): Response
163163
{
164164
/** @var string|null $token */
165-
$token = $request->request->get('token');
165+
$token = $request->getPayload()->get('token');
166166

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

0 commit comments

Comments
 (0)