Fixed Changing content_user_id field on \XF\Entity\ReactionContent results in previous user's reaction score increasing

Xon

Well-known member
Affected version
2.1.2
It _postSave() it looks like the reaction score is not being removed from the previous user as expected.

I believe the line;
PHP:
$this->adjustUserReactionScore($this->getExistingValue('content_user_id'), $reactionScore);
Should be;
PHP:
$this->adjustUserReactionScore($this->getExistingValue('content_user_id'), $this->getExistingValue('is_counted') ? -$reactionScore : $reactionScore);

Note; I don't believe this code-path is actually triggered in stock XF
 
Last edited:
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XF release (2.1.5).

Change log:
Implement the suggested check on `is_counted` from the report thread
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Top Bottom