From bb02115807caa96a1b4f24e64460c4374882da6e Mon Sep 17 00:00:00 2001 From: popov654 Date: Sat, 20 Jul 2024 19:27:16 +0300 Subject: [PATCH 1/2] Fixed typos --- src/PHPHtmlParser/Dom/Node/InnerNode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PHPHtmlParser/Dom/Node/InnerNode.php b/src/PHPHtmlParser/Dom/Node/InnerNode.php index 448057a7..ad13efc8 100644 --- a/src/PHPHtmlParser/Dom/Node/InnerNode.php +++ b/src/PHPHtmlParser/Dom/Node/InnerNode.php @@ -81,7 +81,7 @@ public function getChildren(): array $childrenIds[] = $child->id; $child = $this->nextChild($child->id()); if (\in_array($child->id, $childrenIds, true)) { - throw new CircularException('Circular sibling referance found. Child with id ' . $child->id() . ' found twice.'); + throw new CircularException('Circular sibling reference found on child with id ' . $child->id() . ' found twice.'); } } while (true); } catch (ChildNotFoundException $e) { From 212898053e21b8114fb29fc44e13cc225fa9b95b Mon Sep 17 00:00:00 2001 From: popov654 Date: Sat, 20 Jul 2024 19:29:31 +0300 Subject: [PATCH 2/2] Fixed bug when parent cache was not cleared correctly after child removal --- src/PHPHtmlParser/Dom/Node/HtmlNode.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PHPHtmlParser/Dom/Node/HtmlNode.php b/src/PHPHtmlParser/Dom/Node/HtmlNode.php index 2acb2592..abf4e826 100644 --- a/src/PHPHtmlParser/Dom/Node/HtmlNode.php +++ b/src/PHPHtmlParser/Dom/Node/HtmlNode.php @@ -227,6 +227,7 @@ protected function clear(): void $this->innerHtml = null; $this->outerHtml = null; $this->text = null; + $this->innerText = null; $this->textWithChildren = null; if ($this->parent !== null) {