Skip to content

Commit

Permalink
Merge 4004e5b into 9663472
Browse files Browse the repository at this point in the history
  • Loading branch information
yangxikun committed Oct 18, 2016
2 parents 9663472 + 4004e5b commit 7ab7fd7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/PHPHtmlParser/Dom/AbstractNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,6 @@ public function setParent(InnerNode $parent)
// assign child to parent
$this->parent->addChild($this);

//clear any cache
$this->clear();

return $this;
}

Expand Down
3 changes: 3 additions & 0 deletions src/PHPHtmlParser/Dom/HtmlNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ protected function clear()
$this->innerHtml = null;
$this->outerHtml = null;
$this->text = null;
if ( ! is_null($this->parent)) {
$this->parent->clear();
}
}

/**
Expand Down

0 comments on commit 7ab7fd7

Please sign in to comment.