summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/HTMLParser.php2
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) {