Make WordPress Core


Ignore:
Timestamp:
01/10/2023 11:28:31 AM (18 months ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

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

    r55029 r55046  
    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() ) {
Note: See TracChangeset for help on using the changeset viewer.