HTTP: Accept non-string values in cookies, fixing a regression since 4.5.
Props swissspidy. Merges [38430] to the 4.6 branch. Fixes #37768. Built from https://develop.svn.wordpress.org/branches/4.6@38461 git-svn-id: http://core.svn.wordpress.org/branches/4.6@38402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c53ae0299a
commit
6ddc8affb1
|
@ -433,7 +433,7 @@ class WP_Http {
|
|||
foreach ( $cookies as $name => $value ) {
|
||||
if ( $value instanceof WP_Http_Cookie ) {
|
||||
$cookie_jar[ $value->name ] = new Requests_Cookie( $value->name, $value->value, $value->get_attributes() );
|
||||
} elseif ( is_string( $value ) ) {
|
||||
} elseif ( is_scalar( $value ) ) {
|
||||
$cookie_jar[ $name ] = new Requests_Cookie( $name, $value );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.6.1-alpha-38460';
|
||||
$wp_version = '4.6.1-alpha-38461';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue