Merge "Set the "error" field in the right array"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 8 Apr 2014 16:10:16 +0000 (16:10 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 8 Apr 2014 16:10:16 +0000 (16:10 +0000)
includes/libs/MultiHttpClient.php

index 00cd257..340e7f4 100644 (file)
@@ -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'];