Page Menu
Home
GitPull.it
Search
Configure Global Search
Log In
Files
F14887826
D105.1789374271.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Authored By
Unknown
Size
852 B
Referenced Files
None
Subscribers
None
D105.1789374271.diff
View Options
diff --git a/include/network/HTTPRequest.php b/include/network/HTTPRequest.php
--- a/include/network/HTTPRequest.php
+++ b/include/network/HTTPRequest.php
@@ -309,7 +309,7 @@
// URL
curl_setopt( $curl, CURLOPT_URL, $url );
- // internal cURL shit to do not show the result as output but return it
+ // cURL execution will return the result on success, false on failure
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );
// internal cURL shit to return headers
@@ -317,6 +317,10 @@
// this contains also the headers
$http_response_raw = curl_exec( $curl );
+ // if the execution fails, then the detailed error is logged
+ if ($http_response_raw === false) {
+ Log::error("cURL error: " . curl_error($curl));
+ }
// load the response with the headers
$response = $this->loadHTTPResponseRaw( $http_response_raw );
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Sep 14, 10:24 (2 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2145825
Default Alt Text
D105.1789374271.diff (852 B)
Attached To
Mode
D105: Log detailed error on cURL execution failure
Attached
Detach File
Event Timeline