WordPress.org

Make WordPress Core

Ticket #37494: 37494.3.patch

File 37494.3.patch, 721 bytes (added by ocean90, 5 years ago)

Like 37494.patch, but uses an array

  • src/wp-includes/class-http.php

     
    356356                        $options['proxy'] = new Requests_Proxy_HTTP( $proxy->host() . ':' . $proxy->port() );
    357357
    358358                        if ( $proxy->use_authentication() ) {
    359                                 $options['proxy']->user = $proxy->username();
    360                                 $options['proxy']->pass = $proxy->password();
     359                                $options['proxy'] = new Requests_Proxy_HTTP( array( $proxy->host() . ':' . $proxy->port(), $proxy->username(), $proxy->password() ) );
     360                        } else {
     361                                $options['proxy'] = new Requests_Proxy_HTTP( $proxy->host() . ':' . $proxy->port() );
    361362                        }
    362363                }
    363364