Make WordPress Core


Ignore:
Timestamp:
09/14/2015 05:36:37 PM (10 years ago)
Author:
wonderboymusic
Message:

Fix the case-sensitivity of some HTTP class usage.

See #33413.

File:
1 edited

Legend:

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

    r33880 r34123  
    305305         * @since 3.7.0
    306306         *
    307          * @param array  $value Array of HTTP transports to check. Default array contains
    308          *                      'curl', and 'streams', in that order.
    309          * @param array  $args  HTTP request arguments.
    310          * @param string $url   The URL to request.
     307         * @param array  $transports Array of HTTP transports to check. Default array contains
     308         *                           'curl', and 'streams', in that order.
     309         * @param array  $args       HTTP request arguments.
     310         * @param string $url        The URL to request.
    311311         */
    312         $request_order = apply_filters( 'http_api_transports', array( 'curl', 'streams' ), $args, $url );
     312        $transports = array( 'curl', 'streams' );
     313        $request_order = apply_filters( 'http_api_transports', $transports, $args, $url );
    313314
    314315        // Loop over each transport on each HTTP request looking for one which will serve this request's needs.
    315316        foreach ( $request_order as $transport ) {
    316             $class = 'WP_HTTP_' . $transport;
     317            if ( in_array( $transport, $transports ) ) {
     318                $transport = ucfirst( $transport );
     319            }
     320            $class = 'WP_Http_' . $transport;
    317321
    318322            // Check to see if this transport is a possibility, calls the transport statically.
     
    549553            foreach ( $r['cookies'] as $name => $value ) {
    550554                if ( ! is_object( $value ) )
    551                     $r['cookies'][ $name ] = new WP_HTTP_Cookie( array( 'name' => $name, 'value' => $value ) );
     555                    $r['cookies'][ $name ] = new WP_Http_Cookie( array( 'name' => $name, 'value' => $value ) );
    552556            }
    553557
     
    737741            return $maybe_relative_path;
    738742
    739         if ( ! $url_parts = WP_HTTP::parse_url( $url ) ) {
     743        if ( ! $url_parts = WP_Http::parse_url( $url ) ) {
    740744            return $maybe_relative_path;
    741745        }
    742746
    743         if ( ! $relative_url_parts = WP_HTTP::parse_url( $maybe_relative_path ) ) {
     747        if ( ! $relative_url_parts = WP_Http::parse_url( $maybe_relative_path ) ) {
    744748            return $maybe_relative_path;
    745749        }
     
    825829            $redirect_location = array_pop( $redirect_location );
    826830
    827         $redirect_location = WP_HTTP::make_absolute_url( $redirect_location, $url );
     831        $redirect_location = WP_Http::make_absolute_url( $redirect_location, $url );
    828832
    829833        // POST requests should not POST to a redirected location.
Note: See TracChangeset for help on using the changeset viewer.