mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
HTTP API: Use correct class reference for Requests' HTTP Proxy in WP_Http::request().
Renaming the class was missed in [54997] when updating changes in `WP_Http::request()` for the Requests 2.0.0 external library upgrade. The `HTTP` class no longer exists and caused a fatal error:
{{{
PHP Fatal error: Class 'WpOrg\Requests\Proxy\HTTP' not found in wp-includes/class-wp-http.php on line 382
}}}
This commit renames the class to `Http` and resolves the fatal error.
Follow-up to [52244], [52315], [52327], [52328], [54997], [55007].
Props danielbachhuber, jrf.
See #54504.
git-svn-id: https://develop.svn.wordpress.org/trunk@55046 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -379,7 +379,7 @@ class WP_Http {
|
||||
// Check for proxies.
|
||||
$proxy = new WP_HTTP_Proxy();
|
||||
if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) {
|
||||
$options['proxy'] = new WpOrg\Requests\Proxy\HTTP( $proxy->host() . ':' . $proxy->port() );
|
||||
$options['proxy'] = new WpOrg\Requests\Proxy\Http( $proxy->host() . ':' . $proxy->port() );
|
||||
|
||||
if ( $proxy->use_authentication() ) {
|
||||
$options['proxy']->use_authentication = true;
|
||||
|
||||
Reference in New Issue
Block a user