Fixed QuotePlugin::getQuote calls getBbCodeForQuote twice

Xon

Well-known member
Affected version
2.3.7
PHP:
		$innerContent = $this->app->stringFormatter()->getBbCodeForQuote($message, $context);
		if (strlen($innerContent))
		{
			$quote = $content->getQuoteWrapper(
				$this->app->stringFormatter()->getBbCodeForQuote($message, $context)
			);
		}

I'm not sure there is much point to calling getBbCodeForQuote twice instead of just using that $innerContent variable.

Also actionMultiQuote() should have some updates;


PHP:
			if (!$message)
			{
				continue;
			}
			[$quote, $quoteHtml] = $this->getQuote($content, $message, $context);

			$output[] = ['quote' => $quote, 'quoteHtml' => $quoteHtml];

If a post is 0, then $message will be falsy, and getQuote() and return empty quote/quoteHtml which appears to be intended to be avoided given early empty checks.
 
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.3.8).

Change log:
Fix some issues with the quote plugin
There may be a delay before changes are rolled out to the XenForo Community.
 
Back
Top Bottom