From 1e0905793c00138689b3f7d8f5bea397e143ebf4 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 7 Feb 2015 06:21:22 +0000 Subject: [PATCH] Avoid inadvertent stomping of the original `$args` parameter passed to `plugins_api_result` and `themes_api_result` filters in `plugins_api()` and `themes_api()`, respectively. Fixes a regression introduced in [25956]. props Corphi, obenland. fixes #29079. Built from https://develop.svn.wordpress.org/trunk@31363 git-svn-id: http://core.svn.wordpress.org/trunk@31344 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/plugin-install.php | 6 +++--- wp-admin/includes/theme.php | 6 +++--- wp-includes/version.php | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/wp-admin/includes/plugin-install.php b/wp-admin/includes/plugin-install.php index f9b487add1..8d3ee90ec0 100644 --- a/wp-admin/includes/plugin-install.php +++ b/wp-admin/includes/plugin-install.php @@ -70,18 +70,18 @@ function plugins_api($action, $args = null) { if ( $ssl = wp_http_supports( array( 'ssl' ) ) ) $url = set_url_scheme( $url, 'https' ); - $args = array( + $http_args = array( 'timeout' => 15, 'body' => array( 'action' => $action, 'request' => serialize( $args ) ) ); - $request = wp_remote_post( $url, $args ); + $request = wp_remote_post( $url, $http_args ); if ( $ssl && is_wp_error( $request ) ) { trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE ); - $request = wp_remote_post( $http_url, $args ); + $request = wp_remote_post( $http_url, $http_args ); } if ( is_wp_error($request) ) { diff --git a/wp-admin/includes/theme.php b/wp-admin/includes/theme.php index 2c3a8276d6..2984218bf8 100644 --- a/wp-admin/includes/theme.php +++ b/wp-admin/includes/theme.php @@ -359,19 +359,19 @@ function themes_api( $action, $args = null ) { if ( $ssl = wp_http_supports( array( 'ssl' ) ) ) $url = set_url_scheme( $url, 'https' ); - $args = array( + $http_args = array( 'body' => array( 'action' => $action, 'request' => serialize( $args ) ) ); - $request = wp_remote_post( $url, $args ); + $request = wp_remote_post( $url, $http_args ); if ( $ssl && is_wp_error( $request ) ) { if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) { trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE ); } - $request = wp_remote_post( $http_url, $args ); + $request = wp_remote_post( $http_url, $http_args ); } if ( is_wp_error($request) ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 697c60ac87..12ec328691 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-alpha-31362'; +$wp_version = '4.2-alpha-31363'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.