From: Diogo Cordeiro <diogo@fc.up.pt>
Date: Thu, 25 Apr 2019 21:31:03 +0000 (+0100)
Subject: Fix undefined variables on Favorite plugin by XRevan86
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=bc030da320;p=quix0rs-gnu-social.git

Fix undefined variables on Favorite plugin by XRevan86
---

diff --git a/plugins/Favorite/lib/favenoticestream.php b/plugins/Favorite/lib/favenoticestream.php
index 10a3ec83bd..814ce92500 100644
--- a/plugins/Favorite/lib/favenoticestream.php
+++ b/plugins/Favorite/lib/favenoticestream.php
@@ -46,9 +46,9 @@ class FaveNoticeStream extends ScopingNoticeStream
     {
         $stream = new RawFaveNoticeStream($target, $scoped);
         if ($target->sameAs($scoped)) {
-            $key = 'fave:ids_by_user_own:'.$user_id;
+            $key = 'fave:ids_by_user_own:'.$target->getID();
         } else {
-            $key = 'fave:ids_by_user:'.$user_id;
+            $key = 'fave:ids_by_user:'.$target->getID();
         }
         parent::__construct(new CachingNoticeStream($stream, $key), $scoped);
     }