Fixed Conversation::assertViewableMessage: array_unique return value discarded


Well-known member
Affected version
\XF\Pub\Controller\Conversation::assertViewableMessage, lines 1130 through 1141:

	protected function assertViewableMessage($messageId, array $extraWith = [])
		$extraWith[] = 'Conversation';

		$visitor = \XF::visitor();
		if ($visitor->user_id)
			$extraWith[] = 'Conversation.Recipients|' . $visitor->user_id;
			$extraWith[] = 'Conversation.Users|' . $visitor->user_id;


That last line won't have any effect because the return value isn't assigned to anything.
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.2.14).

Change log:
Properly capture array_unique results
There may be a delay before changes are rolled out to the XenForo Community.
Top Bottom