mirror of
https://github.com/friendica/friendica
synced 2025-05-05 17:04:11 +02:00
Merge remote-tracking branch 'upstream/develop' into ocr
This commit is contained in:
commit
5acfff1152
60 changed files with 526 additions and 488 deletions
|
@ -433,12 +433,12 @@ class HTTPSignature
|
|||
return [];
|
||||
}
|
||||
|
||||
if (!$curlResult->isSuccess() || empty($curlResult->getBody())) {
|
||||
if (!$curlResult->isSuccess() || empty($curlResult->getBodyString())) {
|
||||
Logger::debug('Fetching was unsuccessful', ['url' => $request, 'return-code' => $curlResult->getReturnCode(), 'error-number' => $curlResult->getErrorNumber(), 'error' => $curlResult->getError()]);
|
||||
return [];
|
||||
}
|
||||
|
||||
$content = json_decode($curlResult->getBody(), true);
|
||||
$content = json_decode($curlResult->getBodyString(), true);
|
||||
if (empty($content) || !is_array($content)) {
|
||||
return [];
|
||||
}
|
||||
|
|
|
@ -238,7 +238,7 @@ class ParseUrl
|
|||
}
|
||||
|
||||
$curlResult = DI::httpClient()->get($url, HttpClientAccept::HTML, [HttpClientOptions::CONTENT_LENGTH => 1000000]);
|
||||
if (!$curlResult->isSuccess() || empty($curlResult->getBody())) {
|
||||
if (!$curlResult->isSuccess() || empty($curlResult->getBodyString())) {
|
||||
Logger::info('Empty body or error when fetching', ['url' => $url, 'success' => $curlResult->isSuccess(), 'code' => $curlResult->getReturnCode()]);
|
||||
return $siteinfo;
|
||||
}
|
||||
|
@ -252,7 +252,7 @@ class ParseUrl
|
|||
}
|
||||
}
|
||||
|
||||
$body = $curlResult->getBody();
|
||||
$body = $curlResult->getBodyString();
|
||||
|
||||
if ($do_oembed) {
|
||||
$oembed_data = OEmbed::fetchURL($url, false, false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue