diff --git a/src/Controllers/PostController.php b/src/Controllers/PostController.php index 589a40c3..b2da4300 100644 --- a/src/Controllers/PostController.php +++ b/src/Controllers/PostController.php @@ -580,7 +580,7 @@ class PostController if ($finalKey === null) throw new SimpleException('Not in favorites'); - unset ($post->ownFavoritee[$key]); + unset ($post->ownFavoritee[$finalKey]); R::store($post); $this->context->transport->success = true; }