Ticket #29079: 29079.diff
| File 29079.diff, 2.4 KB (added by , 11 years ago) |
|---|
-
src/wp-admin/includes/plugin-install.php
70 70 if ( $ssl = wp_http_supports( array( 'ssl' ) ) ) 71 71 $url = set_url_scheme( $url, 'https' ); 72 72 73 $ args = array(73 $http_args = array( 74 74 'timeout' => 15, 75 75 'body' => array( 76 76 'action' => $action, 77 77 'request' => serialize( $args ) 78 78 ) 79 79 ); 80 $request = wp_remote_post( $url, $ args );80 $request = wp_remote_post( $url, $http_args ); 81 81 82 82 if ( $ssl && is_wp_error( $request ) ) { 83 83 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 <a href="https://wordpress.org/support/">support forums</a>.' ) . ' ' . __( '(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 ); 84 $request = wp_remote_post( $http_url, $ args );84 $request = wp_remote_post( $http_url, $http_args ); 85 85 } 86 86 87 87 if ( is_wp_error($request) ) { -
src/wp-admin/includes/theme.php
359 359 if ( $ssl = wp_http_supports( array( 'ssl' ) ) ) 360 360 $url = set_url_scheme( $url, 'https' ); 361 361 362 $ args = array(362 $http_args = array( 363 363 'body' => array( 364 364 'action' => $action, 365 365 'request' => serialize( $args ) 366 366 ) 367 367 ); 368 $request = wp_remote_post( $url, $ args );368 $request = wp_remote_post( $url, $http_args ); 369 369 370 370 if ( $ssl && is_wp_error( $request ) ) { 371 371 if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) { 372 372 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 <a href="https://wordpress.org/support/">support forums</a>.' ) . ' ' . __( '(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 ); 373 373 } 374 $request = wp_remote_post( $http_url, $ args );374 $request = wp_remote_post( $http_url, $http_args ); 375 375 } 376 376 377 377 if ( is_wp_error($request) ) {