I corrected the error by adding a line in public/legacy/include/HtmlSanitizer.php
though I have to imagine that there’s something else going on that causes this. Anyway, it’s working for the moment after adding the if
statement below, around line 116:
public static function cleanHtml($dirtyHtml, $removeHtml = false)
{
if (!is_string($dirtyHtml)) $dirtyHtml = '';
return self::getInstance()->clean($dirtyHtml, $removeHtml);
}