Fixed ConversationMaster::canView returns true, or throws an exception

Affected version


Well-known member
public function canView(&$error = null)
   $visitor = \XF::visitor();
   return $this->Users[$visitor->user_id] ? true : false;

If the visitor user id is not part of Users, then AbstractCollection will throw "Undefined offset" instead of returning false.

XF Bug Bot

XenForo bug fixer bot
Staff member
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.1.8).

Change log:
Ensure a boolean value is returned when checking viewing permissions for conversations.
There may be a delay before changes are rolled out to the XenForo Community.