X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Flibs%2FMultiHttpClient.php;h=8c982c431bde8006e18429c2a4439910402861bf;hb=2700298740509a3f98a9e2cd81cfbce4f67ed114;hp=00cd25792f1ad594b00b62dd7f2f746b4d99b1c5;hpb=36fc07f47aad4d870932bfdcc1bbe55c2a43d94b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/MultiHttpClient.php b/includes/libs/MultiHttpClient.php index 00cd25792f..8c982c431b 100644 --- a/includes/libs/MultiHttpClient.php +++ b/includes/libs/MultiHttpClient.php @@ -86,7 +86,7 @@ class MultiHttpClient { * - err : Any cURL error string * The map also stores integer-indexed copies of these values. This lets callers do: * - * list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $req; + * list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $http->run( $req ); * * @param array $req HTTP request array * @param array $opts @@ -110,13 +110,13 @@ class MultiHttpClient { * - err : Any cURL error string * The map also stores integer-indexed copies of these values. This lets callers do: * - * list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $req; + * list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $req['response']; * * All headers in the 'headers' field are normalized to use lower case names. * This is true for the request headers and the response headers. Integer-indexed * method/URL entries will also be changed to use the corresponding string keys. * - * @param array $req Map of HTTP request arrays + * @param array $reqs Map of HTTP request arrays * @param array $opts * - connTimeout : connection timeout per request * - reqTimeout : post-connection timeout per request @@ -211,7 +211,8 @@ class MultiHttpClient { $ch = $handles[$index]; curl_multi_remove_handle( $chm, $ch ); if ( curl_errno( $ch ) !== 0 ) { - $req['error'] = "(curl error: " . curl_errno( $ch ) . ") " . curl_error( $ch ); + $req['response']['error'] = "(curl error: " . + curl_errno( $ch ) . ") " . curl_error( $ch ); } // For convenience with the list() operator $req['response'][0] = $req['response']['code'];