Make WordPress Core

Changeset 38894


Ignore:
Timestamp:
10/25/2016 12:44:13 AM (10 years ago)
Author:
dd32
Message:

HTTP: Call mbstring_binary_safe_encoding() before making a request with Requests to avoid issues with mbstring.func_overload.

Props SergeyBiryukov.
Fixes #38226.

File:
1 edited

Legend:

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

    r38727 r38894  
    360360                }
    361361
     362                // Avoid issues where mbstring.func_overload is enabled
     363                mbstring_binary_safe_encoding();
     364
    362365                try {
    363366                        $requests_response = Requests::request( $url, $headers, $data, $type, $options );
     
    373376                        $response = new WP_Error( 'http_request_failed', $e->getMessage() );
    374377                }
     378
     379                reset_mbstring_encoding();
    375380
    376381                /**
Note: See TracChangeset for help on using the changeset viewer.