Skip to content

Commit

Permalink
Fix for multiple rules (Issue facebookarchive#350)
Browse files Browse the repository at this point in the history
Suggested solution
  • Loading branch information
infinitely-young authored Jul 16, 2019
1 parent 82acc63 commit 6b7da10
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ public function get($node)
{
$fragment = $node->ownerDocument->createDocumentFragment();
foreach ($this->children as $child) {
$cloned_node = Transformer::cloneNode($child->get($node));
$childNode = $child->get($node);
if ($childNode === null) {
continue;
}
$cloned_node = Transformer::cloneNode($childNode);

if (Type::is($cloned_node, 'DOMNode')) {
$fragment->appendChild($cloned_node);
}
Expand Down

0 comments on commit 6b7da10

Please sign in to comment.