We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents af32166 + f22c88e commit 249d3f0Copy full SHA for 249d3f0
src/CssFromHTMLExtractor.php
@@ -86,7 +86,9 @@ protected function createDomDocumentFromHtml($html)
86
{
87
$document = new \DOMDocument('1.0', 'UTF-8');
88
$internalErrors = libxml_use_internal_errors(true);
89
- $document->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'));
+ if (!empty($html)) {
90
+ $document->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'));
91
+ }
92
libxml_use_internal_errors($internalErrors);
93
$document->formatOutput = true;
94
0 commit comments