From 9729db75dee124da14d87bed7d57b718ffda7b16 Mon Sep 17 00:00:00 2001 From: Michael Ciociola <549853+Spoons@users.noreply.github.com> Date: Sun, 6 Aug 2023 20:19:49 +0000 Subject: [PATCH] Update EntryController.php --- src/Wallabag/CoreBundle/Controller/EntryController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index 8491a2875..e458dc113 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php @@ -128,7 +128,7 @@ class EntryController extends AbstractController $this->entityManager->flush(); } - $redirectUrl = $this->redirectHelper->to($request->headers->get('prevUrl')); + $redirectUrl = $this->redirectHelper->to($request->getSession()->get('prevUrl')); return $this->redirect($redirectUrl); } @@ -453,7 +453,7 @@ class EntryController extends AbstractController ); - $redirectUrl = $this->redirectHelper->to($request->headers->get('prevUrl')); + $redirectUrl = $this->redirectHelper->to($request->getSession()->get('prevUrl')); return $this->redirect($redirectUrl); } @@ -483,7 +483,7 @@ class EntryController extends AbstractController $message ); - $redirectUrl = $this->redirectHelper->to($request->headers->get('prevUrl')); + $redirectUrl = $this->redirectHelper->to($request->getSession()->get('prevUrl')); return $this->redirect($redirectUrl); } @@ -520,7 +520,7 @@ class EntryController extends AbstractController // don't redirect user to the deleted entry (check that the referer doesn't end with the same url) - $prev = $request->headers->get('prevUrl'); + $prev = $request->getSession()->get('prevUrl'); $to = (1 !== preg_match('#' . $url . '$#i', $prev) ? $prev : null); $redirectUrl = $this->redirectHelper->to($to);