Skip to content

Commit

Permalink
Fix microformats#174 by cloning input DOMDocument instance
Browse files Browse the repository at this point in the history
  • Loading branch information
Zegnat committed May 27, 2018
1 parent d2a32e3 commit ffa5b67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Mf2/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ public function __construct($input, $url = null, $jsonMode = false) {
@$doc->loadHTML(unicodeToHtmlEntities($input));
}
} elseif (is_a($input, 'DOMDocument')) {
$doc = $input;
$doc = clone $input;
} else {
$doc = new DOMDocument();
@$doc->loadHTML('');
Expand Down

0 comments on commit ffa5b67

Please sign in to comment.