WordPress.org

Make WordPress Core

Ticket #29079: 29079.diff

File 29079.diff, 2.4 KB (added by obenland, 6 years ago)
  • src/wp-admin/includes/plugin-install.php

     
    7070                if ( $ssl = wp_http_supports( array( 'ssl' ) ) )
    7171                        $url = set_url_scheme( $url, 'https' );
    7272
    73                 $args = array(
     73                $http_args = array(
    7474                        'timeout' => 15,
    7575                        'body' => array(
    7676                                'action' => $action,
    7777                                'request' => serialize( $args )
    7878                        )
    7979                );
    80                 $request = wp_remote_post( $url, $args );
     80                $request = wp_remote_post( $url, $http_args );
    8181
    8282                if ( $ssl && is_wp_error( $request ) ) {
    8383                        trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;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 );
    8585                }
    8686
    8787                if ( is_wp_error($request) ) {
  • src/wp-admin/includes/theme.php

     
    359359                if ( $ssl = wp_http_supports( array( 'ssl' ) ) )
    360360                        $url = set_url_scheme( $url, 'https' );
    361361
    362                 $args = array(
     362                $http_args = array(
    363363                        'body' => array(
    364364                                'action' => $action,
    365365                                'request' => serialize( $args )
    366366                        )
    367367                );
    368                 $request = wp_remote_post( $url, $args );
     368                $request = wp_remote_post( $url, $http_args );
    369369
    370370                if ( $ssl && is_wp_error( $request ) ) {
    371371                        if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) {
    372372                                trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;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 );
    373373                        }
    374                         $request = wp_remote_post( $http_url, $args );
     374                        $request = wp_remote_post( $http_url, $http_args );
    375375                }
    376376
    377377                if ( is_wp_error($request) ) {