Fixed XF\BbCode\Parser::parse should coerce $text before looping

Xon

Well-known member
Affected version
2.2.1
In XF\BbCode\Parser::parse, $text can be a object (ie phrase etc) which renders to a string. To avoid re-triggering __toString in a loop, this function should use strval or (string) to ensure the input is actually a string before repeatedly accessing the $text variable
 
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.2).

Change log:
Coerce BB code to a string when parsing.
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Back
Top Bottom