Remove $binary flag for HTTPRequest::get(), HTTPRequest::fetch(), HTTPRequest::fetchAll() (deprecated since PHP 5.1.3)

This commit is contained in:
Philipp 2020-10-10 21:07:17 +02:00
parent 0be3439cb7
commit 94b41e0859
No known key found for this signature in database
GPG key ID: 9A28B7D4FF5667BD
4 changed files with 4 additions and 4 deletions

View file

@ -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),

View file

@ -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();
}
/*

View file

@ -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);

View file

@ -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);