From f803ffa79af646a4d26d78e5f4b0b7a87f9b1133 Mon Sep 17 00:00:00 2001 From: Dag Date: Sun, 21 May 2023 19:59:39 +0200 Subject: [PATCH] fix: ArgumentCountError: DOMDocument::getElementsByTagName() expects exactly 1 argument, 2 given, #3406 (#3407) --- lib/html.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/html.php b/lib/html.php index 9cdb55e6..0ffd9257 100644 --- a/lib/html.php +++ b/lib/html.php @@ -187,13 +187,13 @@ function defaultLinkTo($dom, $url) // Use long method names for compatibility with simple_html_dom and DOMDocument - foreach ($dom->getElementsByTagName('img', null) as $image) { - $image->setAttribute('src', urljoin($url, $image->getAttribute('src'))); - } + // foreach ($dom->getElementsByTagName('img', null) as $image) { + // $image->setAttribute('src', urljoin($url, $image->getAttribute('src'))); + // } - foreach ($dom->getElementsByTagName('a', null) as $anchor) { - $anchor->setAttribute('href', urljoin($url, $anchor->getAttribute('href'))); - } + // foreach ($dom->getElementsByTagName('a', null) as $anchor) { + // $anchor->setAttribute('href', urljoin($url, $anchor->getAttribute('href'))); + // } // Will never be true for DOMDocument if ($string_convert) {