]> git.mxchange.org Git - friendica.git/commitdiff
Use CurlResult for failed HTTPRequests (legacy usage)
authorPhilipp <admin@philipp.info>
Fri, 20 Aug 2021 17:48:16 +0000 (19:48 +0200)
committerPhilipp <admin@philipp.info>
Fri, 20 Aug 2021 17:58:42 +0000 (19:58 +0200)
src/Network/HTTPRequest.php

index 72311ea1980c61e49a68aa1fd7c019c5e017e383..3bc58c19be457d00cc1fd88796e262732f31031d 100644 (file)
@@ -224,7 +224,7 @@ class HTTPRequest implements IHTTPRequest
                        if ($exception->hasResponse()) {
                                return new GuzzleResponse($exception->getResponse(), $url, $exception->getCode(), $exception->getMessage());
                        } else {
-                               return new GuzzleResponse(null, $url, $exception->getCode(), $exception->getMessage());
+                               return new CurlResult($url, '', ['http_code' => $exception->getCode()], $exception->getCode(), $exception->getMessage());
                        }
                } finally {
                        $this->profiler->stopRecording();