Skip to content

Commit beb3231

Browse files
authored
Merge pull request paquettg#88 from yangxikun/master
fix clear() bug
2 parents 23df5a4 + d383264 commit beb3231

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/PHPHtmlParser/Dom/AbstractNode.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,6 @@ public function setParent(InnerNode $parent)
162162
// assign child to parent
163163
$this->parent->addChild($this);
164164

165-
//clear any cache
166-
$this->clear();
167-
168165
return $this;
169166
}
170167

src/PHPHtmlParser/Dom/HtmlNode.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ protected function clear()
186186
$this->innerHtml = null;
187187
$this->outerHtml = null;
188188
$this->text = null;
189+
189190
if (is_null($this->parent) === false) {
190191
$this->parent->clear();
191192
}

0 commit comments

Comments
 (0)