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. Built from https://develop.svn.wordpress.org/trunk@56128 git-svn-id: http://core.svn.wordpress.org/trunk@55640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
919ea56557
commit
c7381d46b5
@ -78,6 +78,9 @@ class WP_Http_Curl {
|
|||||||
'headers' => array(),
|
'headers' => array(),
|
||||||
'body' => null,
|
'body' => null,
|
||||||
'cookies' => array(),
|
'cookies' => array(),
|
||||||
|
'decompress' => false,
|
||||||
|
'stream' => false,
|
||||||
|
'filename' => null,
|
||||||
);
|
);
|
||||||
|
|
||||||
$parsed_args = wp_parse_args( $args, $defaults );
|
$parsed_args = wp_parse_args( $args, $defaults );
|
||||||
|
@ -37,6 +37,9 @@ class WP_Http_Streams {
|
|||||||
'headers' => array(),
|
'headers' => array(),
|
||||||
'body' => null,
|
'body' => null,
|
||||||
'cookies' => array(),
|
'cookies' => array(),
|
||||||
|
'decompress' => false,
|
||||||
|
'stream' => false,
|
||||||
|
'filename' => null,
|
||||||
);
|
);
|
||||||
|
|
||||||
$parsed_args = wp_parse_args( $args, $defaults );
|
$parsed_args = wp_parse_args( $args, $defaults );
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.3-beta2-56127';
|
$wp_version = '6.3-beta2-56128';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user