Skip to content

Commit 234698c

Browse files
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
1 parent 76253b9 commit 234698c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-includes/class-wp-http.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ public function request( $url, $args = array() ) {
379379
// Check for proxies.
380380
$proxy = new WP_HTTP_Proxy();
381381
if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) {
382-
$options['proxy'] = new WpOrg\Requests\Proxy\HTTP( $proxy->host() . ':' . $proxy->port() );
382+
$options['proxy'] = new WpOrg\Requests\Proxy\Http( $proxy->host() . ':' . $proxy->port() );
383383

384384
if ( $proxy->use_authentication() ) {
385385
$options['proxy']->use_authentication = true;

0 commit comments

Comments
 (0)