Make WordPress Core


Ignore:
Timestamp:
07/03/2023 02:01:25 PM (3 years ago)
Author:
SergeyBiryukov
Message:

HTTP API: Declare a few default parameters in WP_Http_Curl and WP_Http_Streams.

This resolves Undefined array key PHP warnings when trying to access any of these values in WP_Http_Curl::request() or WP_Http_Streams::request():

  • $parsed_args['decompress']
  • $parsed_args['stream']
  • $parsed_args['filename']

Follow-up to [10410], [11236], [13274], [17555], [37428], [42766], [44346].

Props sjoerdlinders, hellofromTonya, jrf, oglekler, Clorith, SergeyBiryukov.
Fixes #52622.

File:
1 edited

Legend:

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

    r55646 r56128  
    7979            'body'        => null,
    8080            'cookies'     => array(),
     81            'decompress'  => false,
     82            'stream'      => false,
     83            'filename'    => null,
    8184        );
    8285
Note: See TracChangeset for help on using the changeset viewer.