diff options
author | Andres Rey <[email protected]> | 2017-11-29 00:12:28 +0000 |
---|---|---|
committer | Andres Rey <[email protected]> | 2017-11-29 00:12:28 +0000 |
commit | 3a2259ad3bc4495725b9b0f6fe3b6b82c5193203 (patch) | |
tree | 1f124238839b6ed73b3e5f205eb025b9f8d333bf /src/Readability.php | |
parent | dbc05528180d54a3cf36d728283daef47b841c59 (diff) |
Fix child replacing call
Diffstat (limited to 'src/Readability.php')
-rw-r--r-- | src/Readability.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Readability.php b/src/Readability.php index e80c07b..61174b1 100644 --- a/src/Readability.php +++ b/src/Readability.php @@ -485,7 +485,7 @@ class Readability /** @var $child DOMNode */ if ($child->nodeType === XML_TEXT_NODE && mb_strlen(trim(NodeUtility::getTextContent($child))) > 0) { $newNode = $node->createNode($child, 'p'); - $child->replaceChild($newNode, $child); + $child->parentNode->replaceChild($newNode, $child); } } } |