Index: tests/phpunit/tests/widgets/text-widget.php =================================================================== --- tests/phpunit/tests/widgets/text-widget.php (revision 42991) +++ tests/phpunit/tests/widgets/text-widget.php (working copy) @@ -557,6 +557,7 @@ $legacy_text_examples = array( '', '
Quote', + '', '', "", '', Index: src/wp-includes/widgets/class-wp-widget-text.php =================================================================== --- src/wp-includes/widgets/class-wp-widget-text.php (revision 42991) +++ src/wp-includes/widgets/class-wp-widget-text.php (working copy) @@ -120,6 +120,9 @@ } $doc = new DOMDocument(); + + // Suppress warnings generated by loadHTML + libxml_use_internal_errors( true ); @$doc->loadHTML( sprintf( '%s', @@ -127,6 +130,8 @@ $instance['text'] ) ); + libxml_use_internal_errors( false ); + $body = $doc->getElementsByTagName( 'body' )->item( 0 ); // See $allowedposttags.