Set the "error" field in the right array
authorAaron Schulz <aschulz@wikimedia.org>
Mon, 7 Apr 2014 20:15:31 +0000 (13:15 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Mon, 7 Apr 2014 20:15:31 +0000 (13:15 -0700)
Change-Id: Id822ceb53c57daac0000bef3b304bb0260efe4ce

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'];