X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FUtil%2FHTTPSignature.php;h=01f75776f2c23f5e5f305673e798d821a4d2d429;hb=3bca4fe2a64671d09e08346456cdfa6c12f996e9;hp=d48d02c20e2382cc178948280a25b865a9b45b70;hpb=1d6f5c33a1a7c538d4e529d22701fd735855da15;p=friendica.git diff --git a/src/Util/HTTPSignature.php b/src/Util/HTTPSignature.php index d48d02c20e..01f75776f2 100644 --- a/src/Util/HTTPSignature.php +++ b/src/Util/HTTPSignature.php @@ -1,6 +1,6 @@ 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 []; } @@ -451,7 +452,7 @@ class HTTPSignature * @param string $request request url * @param integer $uid User id of the requester * @param boolean $binary TRUE if asked to return binary results (file download) (default is "false") - * @param array $opts (optional parameters) assoziative array with: + * @param array $opts (optional parameters) associative array with: * 'accept_content' => supply Accept: header with 'accept_content' as the value * 'timeout' => int Timeout in seconds, default system config value or 60 seconds * 'nobody' => only return the header @@ -627,7 +628,7 @@ class HTTPSignature } if (empty($algorithm)) { - Logger::info('No alagorithm'); + Logger::info('No algorithm'); return false; }