From 94b41e0859efb5a2f576e00bbd7b9e927a8cedec Mon Sep 17 00:00:00 2001 From: Philipp Date: Sat, 10 Oct 2020 21:07:17 +0200 Subject: [PATCH] Remove $binary flag for HTTPRequest::get(), HTTPRequest::fetch(), HTTPRequest::fetchAll() (deprecated since PHP 5.1.3) --- mailstream/mailstream.php | 2 +- pumpio/pumpio.php | 2 +- statusnet/statusnet.php | 2 +- twitter/twitter.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mailstream/mailstream.php b/mailstream/mailstream.php index 23aed60f..9631a11a 100644 --- a/mailstream/mailstream.php +++ b/mailstream/mailstream.php @@ -155,7 +155,7 @@ function mailstream_do_images($a, &$item, &$attachments) { continue; } $cookiejar = tempnam(get_temppath(), 'cookiejar-mailstream-'); - $curlResult = DI::httpRequest()->fetchFull($url, true, 0, '', $cookiejar); + $curlResult = DI::httpRequest()->fetchFull($url, 0, '', $cookiejar); $attachments[$url] = [ 'data' => $curlResult->getBody(), 'guid' => hash("crc32", $url), diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php index cea19717..cd44b682 100644 --- a/pumpio/pumpio.php +++ b/pumpio/pumpio.php @@ -1590,7 +1590,7 @@ function pumpio_fetchallcomments(App $a, $uid, $id) function pumpio_reachable($url) { - return DI::httpRequest()->get($url, false, ['timeout' => 10])->isSuccess(); + return DI::httpRequest()->get($url, ['timeout' => 10])->isSuccess(); } /* diff --git a/statusnet/statusnet.php b/statusnet/statusnet.php index 0ab711ca..05853025 100644 --- a/statusnet/statusnet.php +++ b/statusnet/statusnet.php @@ -1453,7 +1453,7 @@ function statusnet_convertmsg(App $a, $body) } elseif ($oembed_data->type != "link") { $body = str_replace($search, "[url=" . $expanded_url . "]" . $expanded_url . "[/url]", $body); } else { - $img_str = DI::httpRequest()->fetch($expanded_url, true, 4); + $img_str = DI::httpRequest()->fetch($expanded_url, 4); $tempfile = tempnam(get_temppath(), "cache"); file_put_contents($tempfile, $img_str); diff --git a/twitter/twitter.php b/twitter/twitter.php index 6f3978f2..d04f3a55 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -1315,7 +1315,7 @@ function twitter_expand_entities($body, stdClass $status, $picture) } elseif ($oembed_data->type != 'link') { $replace = '[url=' . $expanded_url . ']' . $url->display_url . '[/url]'; } else { - $img_str = DI::httpRequest()->fetch($final_url, true, 4); + $img_str = DI::httpRequest()->fetch($final_url, 4); $tempfile = tempnam(get_temppath(), 'cache'); file_put_contents($tempfile, $img_str); -- 2.39.5