mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@56128 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d1f9292a14
commit
94aaa2d9bc
@ -78,6 +78,9 @@ class WP_Http_Curl {
|
||||
'headers' => array(),
|
||||
'body' => null,
|
||||
'cookies' => array(),
|
||||
'decompress' => false,
|
||||
'stream' => false,
|
||||
'filename' => null,
|
||||
);
|
||||
|
||||
$parsed_args = wp_parse_args( $args, $defaults );
|
||||
|
||||
@ -37,6 +37,9 @@ class WP_Http_Streams {
|
||||
'headers' => array(),
|
||||
'body' => null,
|
||||
'cookies' => array(),
|
||||
'decompress' => false,
|
||||
'stream' => false,
|
||||
'filename' => null,
|
||||
);
|
||||
|
||||
$parsed_args = wp_parse_args( $args, $defaults );
|
||||
|
||||
Loading…
Reference in New Issue
Block a user