From dddb7601f446e5f57df6f05be0b38fcdc1c51b04 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Wed, 7 Apr 2021 17:57:42 -0400 Subject: [PATCH] Fix typos --- lib/DOM/Element.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/DOM/Element.php b/lib/DOM/Element.php index 2ddc432..bf1a512 100644 --- a/lib/DOM/Element.php +++ b/lib/DOM/Element.php @@ -137,7 +137,7 @@ class Element extends \DOMElement { } public function setAttributeNode(\DOMAttr $attribute) { - return setAttributeNodeNS($attribute, null); + return $this->setAttributeNodeNS($attribute, null); } public function setAttributeNodeNS(\DOMAttr $attribute) { @@ -153,8 +153,8 @@ class Element extends \DOMElement { // from occurring, a check between the normalized value and classList's // serialized value is performed. The spec is vague on how this is supposed to // be handled. - elseif ($this->_classList !== null && $node->name === 'class' && preg_replace(Data::WHITESPACE_REGEX, ' ', $node->value) !== $this->_classList->value) { - $this->_classList->value = $node->value; + elseif ($this->_classList !== null && $attribute->name === 'class' && preg_replace(Data::WHITESPACE_REGEX, ' ', $attribute->value) !== $this->_classList->value) { + $this->_classList->value = $attribute->value; return $this->getAttributeNode('class'); } }