From fec68fa96922a82a1d40257d1339f7150a01d461 Mon Sep 17 00:00:00 2001 From: thisfro Date: Sat, 8 May 2021 16:59:45 +0200 Subject: [PATCH] Fix deletion of wishes --- src/Controller/UserController.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Controller/UserController.php b/src/Controller/UserController.php index 36a899b..883aa1a 100644 --- a/src/Controller/UserController.php +++ b/src/Controller/UserController.php @@ -72,8 +72,7 @@ class UserController extends AbstractController { $user = $this->getUser(); - $user->removeWish($wish); - $this->entityManager->persist($wish); + $this->entityManager->remove($wish); $this->entityManager->flush(); $this->addFlash("success", "Successfully removed the wish!");