Fixed XF:UserIgnored is saved twice

Sim

Well-known member
Affected version
2.0.10
XF\Service\User\Ignore::ignore() on line 32 the XF:UserIgnored entity is saved using $userIgnored->save(false);

Then it is saved again immediately afterwards (within a try block) on line 36.

I suggest that line 32 be removed - it should be saved within the try block, so the first save I believe to be erroneous.

Also, unless I'm mistaken - I believe that passing false to the save call is redundant (although I'm not sure if actually erroneous?) when we're saving an entity with compound keys ? If so, I note that \XF\Service\User\Follow::follow() also passes false when saving the XF:UserFollow entity with a compound key.
 
Thank you for reporting this issue. The issue is now resolved and we are aiming to include that in the next XF release (2.0.11).

Change log:
Remove extra save call when ignoring member
 
Back
Top Bottom