mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 19:46:21 +00:00
HTTP: Call mbstring_binary_safe_encoding()
before making a request with Requests to avoid issues with mbstring.func_overload
.
Props SergeyBiryukov. Fixes #38226. Built from https://develop.svn.wordpress.org/trunk@38894 git-svn-id: http://core.svn.wordpress.org/trunk@38837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e8211f783a
commit
7ac6b18d89
@ -359,6 +359,9 @@ class WP_Http {
|
||||
}
|
||||
}
|
||||
|
||||
// Avoid issues where mbstring.func_overload is enabled
|
||||
mbstring_binary_safe_encoding();
|
||||
|
||||
try {
|
||||
$requests_response = Requests::request( $url, $headers, $data, $type, $options );
|
||||
|
||||
@ -373,6 +376,8 @@ class WP_Http {
|
||||
$response = new WP_Error( 'http_request_failed', $e->getMessage() );
|
||||
}
|
||||
|
||||
reset_mbstring_encoding();
|
||||
|
||||
/**
|
||||
* Fires after an HTTP API response is received and before the response is returned.
|
||||
*
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-alpha-38893';
|
||||
$wp_version = '4.7-alpha-38894';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
x
Reference in New Issue
Block a user