Catchable fatal error: Method OOUI\HtmlSnippet::__toString()
must return a string value in
/var/www/html/w/vendor/oojs/oojs-ui/php/Element.php on line 245
$this->getHelpText() can return null.
Maybe OOUI\HtmlSnippet should be doing the casting instead, but it
currently doesn't.
Follow-up to
3ec3f08ca5c7bfae820bbc8085eff0809abd688b.
Change-Id: I0bb2a1594ea5ffd86bf8abd41c13f9451df256d5
}
$fieldType = get_class( $this );
+ $helpText = $this->getHelpText();
$field = new OOUI\FieldLayout( $inputField, array(
'classes' => array( "mw-htmlform-field-$fieldType", $this->mClass, $errorClass ),
'align' => $this->getLabelAlignOOUI(),
'label' => $this->getLabel(),
- 'help' => new OOUI\HtmlSnippet( $this->getHelpText() ),
+ 'help' => $helpText !== null ? new OOUI\HtmlSnippet( $helpText ) : null,
'infusable' => $infusable,
) );