Seen in a CI build (Gerrit change) from FlaggedRevs code, but reproducible without FR:
> $wgUseMediaWikiUIEverywhere = true; = true > Xml::input( 'name', false, false, [ 'class' => 'class' ] ) TypeError htmlspecialchars(): Argument #1 ($string) must be of type string, array given.
(Prior to PHP 8, this is a warning instead of a TypeError, see 3v4l.) Seemingly related to the recent changes for T182050 / T341534.