Fixed Call to a member function hasErrors() on null when follow/unfollow a user

Affected version
Latest

truonglv

Formerly Nobita.Kun
If this code block $userFollow = $followService->unfollow(); return to null then the line 441 in XF\Pub\Controller\Member will cause above error.

I guess that record in the table xf_user_follow does not exists but in the table user cached are not updated in some cases.
 
  • Like
Reactions: rdn

XF Bug Bot

XenForo bug fixer bot
Staff member
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:
Check that the follow/unfollow ignore/unignore result returns something before attempting to read any associated errors
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
  • Like
Reactions: Xon
Top