diff options
author | Andres Rey <[email protected]> | 2017-11-11 20:12:05 +0000 |
---|---|---|
committer | Andres Rey <[email protected]> | 2017-11-11 20:12:05 +0000 |
commit | 24aeb34aa6724675e3a501d29258f20ea2d18d67 (patch) | |
tree | 25216b0a2f1bcfcb4fde55cdd0e10fb6c90e0504 /src | |
parent | 0e9d83dfea6982426f73b15a5f1d943164cf409d (diff) |
Switch to array iterator when replacing links on prepArticle
Diffstat (limited to 'src')
-rw-r--r-- | src/HTMLParser.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/HTMLParser.php b/src/HTMLParser.php index 5d1aa48..b896ef7 100644 --- a/src/HTMLParser.php +++ b/src/HTMLParser.php @@ -341,7 +341,7 @@ class HTMLParser // Readability cannot open relative uris so we convert them to absolute uris. if ($this->getConfig()->getOption('fixRelativeURLs')) { - foreach ($article->getElementsByTagName('a') as $link) { + foreach (iterator_to_array($article->getElementsByTagName('a')) as $link) { /** @var \DOMElement $link */ $href = $link->getAttribute('href'); if ($href) { |