mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-31 10:44:26 +00:00
HTTP: Accept non-string values in cookies, fixing a regression since 4.5.
Props swissspidy. Fixes #37768 for trunk. git-svn-id: https://develop.svn.wordpress.org/trunk@38430 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user