From 60e532d5368faa6cbb048d61cac5695c0b972782 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Wed, 21 Feb 2024 12:46:47 +0100 Subject: [PATCH 1/1] Protect from infinite remove recursion --- Entity/Location.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Entity/Location.php b/Entity/Location.php index 984e8d8..613e462 100644 --- a/Entity/Location.php +++ b/Entity/Location.php @@ -444,6 +444,10 @@ class Location { * @return bool */ public function removeUser(User $user): bool { + if (!$this->users->contains($user)) { + return true; + } + //Remove from owning side $user->removeSubscriber($this); -- 2.41.1