summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndres Rey <[email protected]>2017-11-27 23:16:36 +0000
committerAndres Rey <[email protected]>2017-11-27 23:16:36 +0000
commitb8bc3e155c8fec2987b8af5a7b759e82f0049629 (patch)
tree7ef7e1444b2d7784b3b80efce7608951ed540967 /src
parentb451967be02cc08bf167b0e4f7b3a63f26b23ba5 (diff)
Fix incorrect calls
Diffstat (limited to 'src')
-rw-r--r--src/Readability.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Readability.php b/src/Readability.php
index efcbae4..43b6861 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -411,7 +411,7 @@ class Readability
$matchString = $node->getAttribute('class') . ' ' . $node->getAttribute('id');
// Remove DOMComments nodes as we don't need them and mess up children counting
- if ($node->nodeTypeEqualsTo(XML_COMMENT_NODE)) {
+ if ($node->nodeType ===XML_COMMENT_NODE) {
$node = NodeUtility::removeAndGetNext($node);
continue;
}
@@ -855,7 +855,7 @@ class Readability
if ($append) {
$hasContent = true;
- if (!in_array(strtolower($sibling->getTagName()), $this->alterToDIVExceptions)) {
+ if (!in_array(strtolower($sibling->nodeName), $this->alterToDIVExceptions)) {
/*
* We have a node that isn't a common block level element, like a form or td tag.
* Turn it into a div so it doesn't get filtered out later by accident.
@@ -864,7 +864,7 @@ class Readability
$sibling->setNodeTag('div');
}
- $import = $articleContent->importNode($sibling->getDOMNode(), true);
+ $import = $articleContent->importNode($sibling, true);
$articleContent->appendChild($import);
/*