Fixed Conversation::assertViewableMessage: array_unique return value discarded

PaulB

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

PHP:
	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;
		}

		array_unique($extraWith);

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