]> git.mxchange.org Git - friendica.git/commitdiff
Use CurlResult for failed HTTPRequests (legacy usage)
authorPhilipp <admin@philipp.info>
Fri, 9 Oct 2020 17:59:24 +0000 (19:59 +0200)
committerPhilipp <admin@philipp.info>
Sat, 10 Oct 2020 21:11:30 +0000 (23:11 +0200)
src/Network/HTTPRequest.php

index 798b0cdea8ab4472f1f6359b71e088ad2fad451a..e0400b6b9426a1edf5f0c99f9f44682f8d415f87 100644 (file)
@@ -195,7 +195,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->saveTimestamp($stamp1, 'network');