diff --git a/wp-includes/class-http.php b/wp-includes/class-http.php index 703a74e208..24b7724b89 100644 --- a/wp-includes/class-http.php +++ b/wp-includes/class-http.php @@ -459,7 +459,13 @@ 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(), array( 'host-only' => $value->host_only ) ); + $attributes = array_filter( + $value->get_attributes(), + static function( $attr ) { + return null !== $attr; + } + ); + $cookie_jar[ $value->name ] = new Requests_Cookie( $value->name, $value->value, $attributes, array( 'host-only' => $value->host_only ) ); } elseif ( is_scalar( $value ) ) { $cookie_jar[ $name ] = new Requests_Cookie( $name, $value ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 85d0e73278..a3f5c90e95 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-51800'; +$wp_version = '5.9-alpha-51801'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.