]> Raphaƫl G. Git Repositories - airbundle/blobdiff - Entity/Dance.php
Protect from infinite remove recursion
[airbundle] / Entity / Dance.php
index 59896cdad505495196db859127b24a081cda5c7b..8d83062901439c9a72b02a88da5c5f7da43f1b7b 100644 (file)
@@ -225,6 +225,10 @@ class Dance {
         * @return bool
         */
        public function removeUser(User $user): bool {
+               if (!$this->users->contains($user)) {
+                       return true;
+               }
+
                //Remove from owning side
                $user->removeSubscriber($this);