Move internal recursion-counter to the end of all cur/fetchUrl parameters

This commit is contained in:
Philipp Holzer 2019-06-10 14:34:53 +02:00
parent f6c8476228
commit 8562422ee2
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
4 changed files with 4 additions and 5 deletions

View file

@ -1184,7 +1184,7 @@ function twitter_expand_entities(App $a, $body, $item, $picture)
} elseif ($oembed_data->type != 'link') {
$body = str_replace($url->url, '[url=' . $expanded_url . ']' . $url->display_url . '[/url]', $body);
} else {
$img_str = Network::fetchUrl($final_url, true, $redirects, 4);
$img_str = Network::fetchUrl($final_url, true, 4);
$tempfile = tempnam(get_temppath(), 'cache');
file_put_contents($tempfile, $img_str);