From 234698c55171f6479e4b6c127b0dcd6992ed7bf1 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 10 Jan 2023 11:28:31 +0000 Subject: [PATCH] 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 --- src/wp-includes/class-wp-http.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/class-wp-http.php b/src/wp-includes/class-wp-http.php index 2472367835..7edffe0e6b 100644 --- a/src/wp-includes/class-wp-http.php +++ b/src/wp-includes/class-wp-http.php @@ -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;