From 90e7bf7cc385a64e3a91f30a6415a598ae0d0e99 Mon Sep 17 00:00:00 2001 From: wn_ Date: Sat, 30 Dec 2023 15:38:41 +0000 Subject: Update all UrlHelper::fetch() calls to use the associative array approach. The other approach (passing in individual params) was marked as deprecated a few years ago. --- plugins/af_comics/filters/af_comics_tfd.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'plugins/af_comics/filters/af_comics_tfd.php') diff --git a/plugins/af_comics/filters/af_comics_tfd.php b/plugins/af_comics/filters/af_comics_tfd.php index 2010da37e..ec245ef94 100644 --- a/plugins/af_comics/filters/af_comics_tfd.php +++ b/plugins/af_comics/filters/af_comics_tfd.php @@ -8,15 +8,16 @@ class Af_Comics_Tfd extends Af_ComicFilter { function process(&$article) { if (strpos($article["link"], "toothpastefordinner.com") !== false || strpos($article["link"], "marriedtothesea.com") !== false) { - $res = UrlHelper::fetch($article["link"], false, false, false, - false, false, 0, - "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)"); + $res = UrlHelper::fetch([ + 'url' => $article['link'], + 'useragent' => 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)', + ]); if (!$res) return false; $doc = new DOMDocument(); - $res = UrlHelper::fetch($article["link"]); + $res = UrlHelper::fetch(['url' => $article["link"]]); if ($res && $doc->loadHTML($res)) { $xpath = new DOMXPath($doc); -- cgit v1.2.3