Skip to content

Commit

Permalink
[+]: fixed php-warning from "dom_import_simplexml()"
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars Moelleken committed Jun 7, 2016
1 parent 3c81470 commit 653dd6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/voku/helper/HtmlDomParser.php
Expand Up @@ -204,7 +204,7 @@ private function createDOMDocument($html)
}

$sxe = simplexml_load_string($html, 'SimpleXMLElement', $options);
if (count(libxml_get_errors()) === 0) {
if ($sxe !== false && count(libxml_get_errors()) === 0) {
$this->document = dom_import_simplexml($sxe)->ownerDocument;
} else {
$this->document->loadHTML('<?xml encoding="' . $this->getEncoding() . '">' . $html);
Expand Down

0 comments on commit 653dd6b

Please sign in to comment.