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

truonglv

Well-known member
Affected version
Latest
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.
 
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.
 
Top Bottom