diff options
author | Andres Rey <[email protected]> | 2016-11-19 20:54:01 +0000 |
---|---|---|
committer | Andres Rey <[email protected]> | 2016-11-19 20:54:01 +0000 |
commit | 8bb837903ba8305c75fb1681ee8c9c4cb7449c5d (patch) | |
tree | a33d1550142c8a51a3bb2e8002edb396ce72ffd7 /src/Readability.php | |
parent | 09521a8a19154e54e32c2699b688760345226c2c (diff) |
Fixed incorrect approach when counting nodeLists
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 3ba4538..d2dc9f5 100644 --- a/src/Readability.php +++ b/src/Readability.php @@ -296,7 +296,7 @@ class Readability extends Element implements ReadabilityInterface $new->appendChild($new->createElement($value)); $childs = $this->node->childNodes; - for ($i = 0; $i < count($childs); $i++) { + for ($i = 0; $i < $childs->length; $i++) { $import = $new->importNode($childs->item($i), true); $new->firstChild->appendChild($import); } |