Make WordPress Core

Ticket #38226: 38226.patch

File 38226.patch, 847 bytes (added by SergeyBiryukov, 9 years ago)
  • src/wp-includes/class-http.php

     
    361361                // Work around a bug in Requests when the path starts with // See https://github.com/rmccue/Requests/issues/231
    362362                $url = preg_replace( '!^(\w+://[^/]+)//(.*)$!i', '$1/$2', $url );
    363363
     364                // Avoid issues where mbstring.func_overload is enabled
     365                mbstring_binary_safe_encoding();
     366
    364367                try {
    365368                        $requests_response = Requests::request( $url, $headers, $data, $type, $options );
    366369
     
    375378                        $response = new WP_Error( 'http_request_failed', $e->getMessage() );
    376379                }
    377380
     381                reset_mbstring_encoding();
     382
    378383                /**
    379384                 * Fires after an HTTP API response is received and before the response is returned.
    380385                 *