Automatic updates: Include error data in the follow-up API request.

props dd32.
see #22704.

Built from https://develop.svn.wordpress.org/trunk@25781


git-svn-id: http://core.svn.wordpress.org/trunk@25694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin
2013-10-14 23:33:10 +00:00
parent 9b56d4d11f
commit cdede88a23
2 changed files with 10 additions and 4 deletions

View File

@@ -86,8 +86,12 @@ function wp_version_check( $extra_stats = array() ) {
'multisite_enabled' => $multisite_enabled,
);
$post_body = array(
'translations' => json_encode( $translations ),
);
if ( $extra_stats )
$query = array_merge( $query, $extra_stats );
$post_body = array_merge( $post_body, $extra_stats );
$url = 'http://api.wordpress.org/core/version-check/1.7/?' . http_build_query( $query, null, '&' );
if ( wp_http_supports( array( 'ssl' ) ) )
@@ -100,9 +104,7 @@ function wp_version_check( $extra_stats = array() ) {
'wp_install' => $wp_install,
'wp_blog' => home_url( '/' )
),
'body' => array(
'translations' => json_encode( $translations ),
),
'body' => $post_body,
);
$response = wp_remote_post( $url, $options );