Make WordPress Core


Ignore:
Timestamp:
07/03/2023 02:01:25 PM (15 months 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-streams.php

    r55886 r56128  
    3838            'body'        => null,
    3939            'cookies'     => array(),
     40            'decompress'  => false,
     41            'stream'      => false,
     42            'filename'    => null,
    4043        );
    4144
Note: See TracChangeset for help on using the changeset viewer.