Merge remote-tracking branch 'upstream/develop' into channel-relay

This commit is contained in:
Michael 2024-01-15 06:14:55 +00:00
commit 7a13d8b8ac
63 changed files with 621 additions and 512 deletions

View file

@ -132,7 +132,7 @@ class MatchInterests extends BaseModule
}
}
$entries = $this->parseContacts(json_decode($result->getBody()), $entries, $limit);
$entries = $this->parseContacts(json_decode($result->getBodyString()), $entries, $limit);
}
if (empty($entries)) {

View file

@ -132,8 +132,8 @@ class Community extends Timeline
$pager = new BoundariesPager(
$this->l10n,
$this->args->getQueryString(),
$items[0]['received'],
$items[count($items) - 1]['received'],
$items[array_key_first($items)]['received'],
$items[array_key_last($items)]['received'],
$this->itemsPerPage
);

View file

@ -155,7 +155,7 @@ class Magic extends BaseModule
System::externalRedirect($dest);
}
$j = json_decode($curlResult->getBody(), true);
$j = json_decode($curlResult->getBodyString(), true);
if (empty($j) || !$j['success']) {
$this->logger->notice('Invalid JSON, redirecting to destination.', ['json' => $j, 'dest' => $dest]);
$this->app->redirect($dest);

View file

@ -154,7 +154,7 @@ class PubSubHubBub extends \Friendica\BaseModule
$separator = parse_url($hub_callback, PHP_URL_QUERY) === null ? '?' : '&';
$fetchResult = $this->httpClient->fetchFull($hub_callback . $separator . $params);
$body = $fetchResult->getBody();
$body = $fetchResult->getBodyString();
$returnCode = $fetchResult->getReturnCode();
// give up if the HTTP return code wasn't a success (2xx)

View file

@ -96,7 +96,7 @@ class Subscribe extends \Friendica\BaseModule
return $o . $this->t('Couldn\'t fetch friends for contact.');
}
$friends = $curlResult->getBody();
$friends = $curlResult->getBodyString();
if (empty($friends)) {
$this->pConfig->delete($uid, 'ostatus', 'legacy_contact');
return $o . $this->t('Couldn\'t fetch following contacts.');

View file

@ -85,7 +85,7 @@ class Proxy extends BaseModule
// Fetch the content with the local user
try {
$fetchResult = HTTPSignature::fetchRaw($request['url'], DI::userSession()->getLocalUserId(), [HttpClientOptions::ACCEPT_CONTENT => [HttpClientAccept::IMAGE], 'timeout' => 10]);
$img_str = $fetchResult->getBody();
$img_str = $fetchResult->getBodyString();
if (!$fetchResult->isSuccess() || empty($img_str)) {
Logger::notice('Error fetching image', ['image' => $request['url'], 'return' => $fetchResult->getReturnCode(), 'empty' => empty($img_str)]);