WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/4.6/src/wp-includes/class-http.php

    r38173 r38485  
    363363        }
    364364
     365        // Work around a bug in Requests when the path starts with // See https://github.com/rmccue/Requests/issues/231
     366        $url = preg_replace( '!^(\w+://[^/]+)//(.*)$!i', '$1/$2', $url );
     367
    365368        try {
    366369            $requests_response = Requests::request( $url, $headers, $data, $type, $options );
     
    434437            if ( $value instanceof WP_Http_Cookie ) {
    435438                $cookie_jar[ $value->name ] = new Requests_Cookie( $value->name, $value->value, $value->get_attributes() );
    436             } elseif ( is_string( $value ) ) {
     439            } elseif ( is_scalar( $value ) ) {
    437440                $cookie_jar[ $name ] = new Requests_Cookie( $name, $value );
    438441            }
Note: See TracChangeset for help on using the changeset viewer.