- Affected version
- 2.2.5
If
Note;
I think a simple solution is to add an explicit
XF\Phrase::allowHtml
is true, and $options['fallback'] = \XF::Phrase(....)
and $options['fallbackRaw'] = true
then renderPhrase
will return a non-string causing XF\Phrase::__toString()
to fail with an "Method XF\Phrase::__toString() must return a string value" error.Note;
$allowHtml = false
, then escapeString
will coerce the output to a string.I think a simple solution is to add an explicit
strval
call or (string)
cast;
PHP:
public function __toString()
{
try
{
return \strval($this->render());