Merge pull request #106 from edwinhuish/destroy-old-phpquey-object-when-setHtml
destroy old phpquery object when setHtml
This commit is contained in:
commit
aa90e5a21d
@ -49,6 +49,9 @@ class Query
|
||||
public function setHtml($html, $charset = null)
|
||||
{
|
||||
$this->html = value($html);
|
||||
if($this->document){
|
||||
$this->destroyDocument();
|
||||
}
|
||||
$this->document = phpQuery::newDocumentHTML($this->html,$charset);
|
||||
return $this->ql;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user