From: Matthias Schmidt Date: Sun, 27 Jan 2019 14:50:45 +0000 (+0100) Subject: Fix `like` return value of `LikeHandler::like()` X-Git-Tag: 5.2.0_Alpha_1~343 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fbb65635b26e326955a1270fb97ac254cc1bdc4d;p=GitHub%2FWoltLab%2FWCF.git Fix `like` return value of `LikeHandler::like()` See #2508 See 6077024256f9a325daa8b58173c764e62fad24d9 --- diff --git a/wcfsetup/install/files/lib/system/like/LikeHandler.class.php b/wcfsetup/install/files/lib/system/like/LikeHandler.class.php index f4734007ec..1f027aaa54 100644 --- a/wcfsetup/install/files/lib/system/like/LikeHandler.class.php +++ b/wcfsetup/install/files/lib/system/like/LikeHandler.class.php @@ -131,7 +131,7 @@ class LikeHandler extends SingletonFactory { return [ 'data' => $this->loadLikeStatus($reactData['likeObject'], $user), - 'like' => $reactData['likeObject'], + 'like' => $reactData['like'], 'newValue' => $newValue, 'oldValue' => 0, // this value is currently a dummy value, maybe determine a real value 'users' => [] diff --git a/wcfsetup/install/files/lib/system/reaction/ReactionHandler.class.php b/wcfsetup/install/files/lib/system/reaction/ReactionHandler.class.php index 4d29498f69..fa45daa450 100644 --- a/wcfsetup/install/files/lib/system/reaction/ReactionHandler.class.php +++ b/wcfsetup/install/files/lib/system/reaction/ReactionHandler.class.php @@ -376,6 +376,7 @@ class ReactionHandler extends SingletonFactory { return [ 'cachedReactions' => $likeObjectData['cachedReactions'], 'reactionTypeID' => $reactionTypeID, + 'like' => $like, 'likeObject' => $likeObjectData['likeObject'], 'cumulativeLikes' => $likeObjectData['cumulativeLikes'] ];