HTTP: Accept non-string values in cookies, fixing a regression since 4.5.

Props swissspidy.
Fixes #37768 for trunk.

Built from https://develop.svn.wordpress.org/trunk@38430


git-svn-id: http://core.svn.wordpress.org/trunk@38371 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse 2016-08-29 02:42:45 +00:00
parent e45ebb28f2
commit 30270d851f
2 changed files with 2 additions and 2 deletions

View File

@ -436,7 +436,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 );
}
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7-alpha-38429';
$wp_version = '4.7-alpha-38430';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.